# This file contains a scenario for testing preedit text when a user uses
# 12-key flick-toggle key layout on mobile.

# Enable IME
SEND_KEY	ON

SET_MOBILE_REQUEST

# TWELVE_KEYS_TO_HIRAGANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	TWELVE_KEYS_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	5555222227
SEND_KEY	RIGHT
SEND_KEYS	779999
EXPECT_PREEDIT	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ


# TWELVE_KEYS_TO_HALFWIDTHASCII
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	TWELVE_KEYS_TO_HALFWIDTHASCII	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HALF_ASCII

SEND_KEYS	2223
EXPECT_PREEDIT	cd

EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ
EXPECT_IN_ALL_CANDIDATE_WORDS	2223
EXPECT_IN_ALL_CANDIDATE_WORDS	２２２３
# See also http://b/issue?id=7593892.
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	aaad
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	222
EXPECT_IN_ALL_CANDIDATE_WORDS	２２２


# FLICK_TO_HIRAGANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	FLICK_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA

SEND_KEYS	l|7py
EXPECT_PREEDIT	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	l|7py
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	7

RESET_CONTEXT
SEND_KEYS	147
EXPECT_PREEDIT	あたま
EXPECT_IN_ALL_CANDIDATE_WORDS	147
EXPECT_IN_ALL_CANDIDATE_WORDS	１４７
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	14
EXPECT_IN_ALL_CANDIDATE_WORDS	１４


# FLICK_TO_HALFWIDTHASCII
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	FLICK_TO_HALFWIDTHASCII	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HALF_ASCII

SEND_KEYS	c3
EXPECT_PREEDIT	cd

EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	c3
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	3

RESET_CONTEXT
SEND_KEYS	258
EXPECT_IN_ALL_CANDIDATE_WORDS	ajt
EXPECT_IN_ALL_CANDIDATE_WORDS	AJT
EXPECT_IN_ALL_CANDIDATE_WORDS	Ajt
EXPECT_IN_ALL_CANDIDATE_WORDS	Ａｊｔ
EXPECT_IN_ALL_CANDIDATE_WORDS	ａｊｔ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＡＪＴ
EXPECT_IN_ALL_CANDIDATE_WORDS	258
EXPECT_IN_ALL_CANDIDATE_WORDS	２５８
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	25
EXPECT_IN_ALL_CANDIDATE_WORDS	２５


# TOGGLE_FLICK_TO_HIRAGANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	TOGGLE_FLICK_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA
SEND_KEYS	l|7p9999
EXPECT_PREEDIT	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	l|7p9999
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	79999

RESET_CONTEXT
SEND_KEYS	147
EXPECT_PREEDIT	あたま
EXPECT_IN_ALL_CANDIDATE_WORDS	147
EXPECT_IN_ALL_CANDIDATE_WORDS	１４７
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	14
EXPECT_IN_ALL_CANDIDATE_WORDS	１４


# TOGGLE_FLICK_TO_HALFWIDTHASCII
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	TOGGLE_FLICK_TO_HALFWIDTHASCII	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HALF_ASCII

SEND_KEYS	2223
EXPECT_PREEDIT	cd

EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ
EXPECT_IN_ALL_CANDIDATE_WORDS	2223
EXPECT_IN_ALL_CANDIDATE_WORDS	２２２３
# See also http://b/issue?id=7593892.
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	aaad
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	222
EXPECT_IN_ALL_CANDIDATE_WORDS	２２２

RESET_CONTEXT
SEND_KEYS	c3
EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	2223
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	２２２３
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	3

RESET_CONTEXT
SEND_KEYS	258
EXPECT_IN_ALL_CANDIDATE_WORDS	ajt
EXPECT_IN_ALL_CANDIDATE_WORDS	AJT
EXPECT_IN_ALL_CANDIDATE_WORDS	Ajt
EXPECT_IN_ALL_CANDIDATE_WORDS	Ａｊｔ
EXPECT_IN_ALL_CANDIDATE_WORDS	ａｊｔ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＡＪＴ
EXPECT_IN_ALL_CANDIDATE_WORDS	258
EXPECT_IN_ALL_CANDIDATE_WORDS	２５８
SEND_KEY	LEFT
EXPECT_IN_ALL_CANDIDATE_WORDS	25
EXPECT_IN_ALL_CANDIDATE_WORDS	２５


# QWERTY_MOBILE_TO_HIRAGANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	QWERTY_MOBILE_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA

SEND_KEYS	nekomamire
EXPECT_PREEDIT	ねこまみれ

EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ
EXPECT_IN_ALL_CANDIDATE_WORDS	nekomamire
EXPECT_IN_ALL_CANDIDATE_WORDS	ｎｅｋｏｍａｍｉｒｅ
EXPECT_IN_ALL_CANDIDATE_WORDS	NEKOMAMIRE
EXPECT_IN_ALL_CANDIDATE_WORDS	Nekomamire
EXPECT_IN_ALL_CANDIDATE_WORDS	ＮＥＫＯＭＡＭＩＲＥ
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｎｅｋｏｍａｍｉｒｅ


# QWERTY_MOBILE_TO_HALFWIDTHASCII
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	QWERTY_MOBILE_TO_HALFWIDTHASCII	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HALF_ASCII

SEND_KEYS	cd
EXPECT_PREEDIT	cd

EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ


# GODAN_TO_HIRAGANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	GODAN_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA

SEND_KEYS	nekomamire
EXPECT_PREEDIT	ねこまみれ

EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ
EXPECT_IN_ALL_CANDIDATE_WORDS	nekomamire
EXPECT_IN_ALL_CANDIDATE_WORDS	ｎｅｋｏｍａｍｉｒｅ
EXPECT_IN_ALL_CANDIDATE_WORDS	NEKOMAMIRE
EXPECT_IN_ALL_CANDIDATE_WORDS	Nekomamire
EXPECT_IN_ALL_CANDIDATE_WORDS	ＮＥＫＯＭＡＭＩＲＥ
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｎｅｋｏｍａｍｉｒｅ


# GODAN_TO_HALFWIDTHASCII
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	GODAN_TO_HALFWIDTHASCII	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HALF_ASCII

SEND_KEYS	cd
EXPECT_PREEDIT	cd

EXPECT_IN_ALL_CANDIDATE_WORDS	cd
EXPECT_IN_ALL_CANDIDATE_WORDS	CD
EXPECT_IN_ALL_CANDIDATE_WORDS	Cd
EXPECT_IN_ALL_CANDIDATE_WORDS	Ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ｃｄ
EXPECT_IN_ALL_CANDIDATE_WORDS	ＣＤ


# NOTOUCH_KANA
RESET_CONTEXT
UPDATE_MOBILE_KEYBOARD	NOTOUCH_TO_HIRAGANA	SPACE_OR_CONVERT_KEEPING_COMPOSITION
SWITCH_INPUT_MODE	HIRAGANA

SEND_KEYS	l|<py
EXPECT_PREEDIT	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ねこまみれ
EXPECT_IN_ALL_CANDIDATE_WORDS	ネコマミレ
EXPECT_IN_ALL_CANDIDATE_WORDS	ﾈｺﾏﾐﾚ
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	l|<py
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	<

RESET_CONTEXT
SEND_KEYS	!'<
EXPECT_PREEDIT	あたま
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	!'<
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	！’＜
SEND_KEY	LEFT
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	!'
EXPECT_NOT_IN_ALL_CANDIDATE_WORDS	！’
