# Enable IME
SEND_KEY	ON
RESET_CONTEXT

SEND_KEYS	aiueo
SEND_KEY	SPACE
# Resegment to |a|i|u|eo| and select |2nd|2nd|3rd|2nd| candidates.
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SPACE
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SHIFT RIGHT
SEND_KEY	SPACE
# Expand 2nd segment.
# Resegment to |a|iu|eo| and selected index should be |2nd|1st|1st|
# TODO(hsumita): Keep the selected index of a 3rd segment.
SEND_KEY	HOME
SEND_KEY	RIGHT
SEND_KEY	SHIFT RIGHT
SEND_KEY	ENTER

EXPECT_USAGE_STATS_COUNT	ConsumedSendKey	29
EXPECT_USAGE_STATS_COUNT	UnconsumedSendKey	0
EXPECT_USAGE_STATS_COUNT	Commit	1
EXPECT_USAGE_STATS_COUNT	CommitFromConversion	1
EXPECT_USAGE_STATS_COUNT	CommitFromPrediction	0
EXPECT_USAGE_STATS_COUNT	CommitFromComposition	0
EXPECT_USAGE_STATS_COUNT	CommitFromUnknown	0

EXPECT_USAGE_STATS_COUNT	ConversionCandidates0	2
EXPECT_USAGE_STATS_COUNT	ConversionCandidates1	1
EXPECT_USAGE_STATS_COUNT	ConversionCandidates2	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates3	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates4	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates5	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	TransliterationCandidates0	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates1	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates2	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates3	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates4	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates5	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	PredictionCandidates0	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates1	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates2	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates3	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates4	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates5	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	MouseSelect	0
EXPECT_USAGE_STATS_COUNT	BackSpaceAfterCommit	0


CLEAR_USAGE_STATS

SEND_KEYS	aiueo
SEND_KEY	SPACE
# Resegment to |a|i|ue|o| and select |2nd|2nd|3rd|2nd| candidates.
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT LEFT
SEND_KEY	SHIFT RIGHT
SEND_KEY	SPACE
SEND_KEY	SPACE
SEND_KEY	RIGHT
SEND_KEY	SPACE
# Expand 2nd segment
# Resegment to |a|iu|e|o| and selected index should be |2nd|1st|1st|1st|
SEND_KEY	HOME
SEND_KEY	RIGHT
SEND_KEY	SHIFT RIGHT
SEND_KEY	ENTER

EXPECT_USAGE_STATS_COUNT	ConsumedSendKey	28
EXPECT_USAGE_STATS_COUNT	UnconsumedSendKey	0
EXPECT_USAGE_STATS_COUNT	Commit	1
EXPECT_USAGE_STATS_COUNT	CommitFromConversion	1
EXPECT_USAGE_STATS_COUNT	CommitFromPrediction	0
EXPECT_USAGE_STATS_COUNT	CommitFromComposition	0
EXPECT_USAGE_STATS_COUNT	CommitFromUnknown	0

EXPECT_USAGE_STATS_COUNT	ConversionCandidates0	3
EXPECT_USAGE_STATS_COUNT	ConversionCandidates1	1
EXPECT_USAGE_STATS_COUNT	ConversionCandidates2	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates3	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates4	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidates5	0
EXPECT_USAGE_STATS_COUNT	ConversionCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	TransliterationCandidates0	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates1	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates2	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates3	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates4	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidates5	0
EXPECT_USAGE_STATS_COUNT	TransliterationCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	PredictionCandidates0	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates1	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates2	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates3	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates4	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidates5	0
EXPECT_USAGE_STATS_COUNT	PredictionCandidatesGE10	0

EXPECT_USAGE_STATS_COUNT	MouseSelect	0
EXPECT_USAGE_STATS_COUNT	BackSpaceAfterCommit	0
