# Enable IME
SEND_KEY	ON
RESET_CONTEXT

# Set request
SET_DEFAULT_REQUEST
SET_REQUEST	language_aware_input	LANGUAGE_AWARE_SUGGESTION
SWITCH_INPUT_MODE	HIRAGANA

# Check the house (ほうせ) case.  "house" is in the dictionary, so Language
# aware suggest should be triggered.
CLEAR_USAGE_STATS
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	house
EXPECT_PREEDIT	ほうせ
EXPECT_IN_ALL_CANDIDATE_WORDS	house

EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	1
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SUBMIT_CANDIDATE_BY_VALUE	house

EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	1
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	1


# Send key events of python (ｐｙてょｎ).  In the ｐｙてょｎ case, when the
# length of key types becomes four or more, LanguageAwareSuggestion should
# be triggered.
CLEAR_USAGE_STATS
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	p
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	y
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	t
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	h
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	0
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	o
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	1
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

SEND_KEYS	n
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	2
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	0

EXPECT_PREEDIT	ｐｙてょｎ
EXPECT_IN_ALL_CANDIDATE_WORDS	python

SUBMIT_CANDIDATE_BY_VALUE	python

EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionTriggered	2
EXPECT_USAGE_STATS_COUNT	LanguageAwareSuggestionCommitted	1
