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

# Enable IME
SEND_KEY	ON

SET_MOBILE_REQUEST
SWITCH_COMPOSITION_MODE	HIRAGANA

# Simple toggling on Ha-row. First, in the forward order.
RESET_CONTEXT
SEND_KEYS	6
EXPECT_PREEDIT	は
SEND_KEYS	6
EXPECT_PREEDIT	ひ
SEND_KEYS	6
EXPECT_PREEDIT	ふ
SEND_KEYS	6
EXPECT_PREEDIT	へ
SEND_KEYS	6
EXPECT_PREEDIT	ほ
SEND_KEYS	6
EXPECT_PREEDIT	は

# Then reverse order.
UNDO_OR_REWIND
EXPECT_PREEDIT	ほ
UNDO_OR_REWIND
EXPECT_PREEDIT	へ
UNDO_OR_REWIND
EXPECT_PREEDIT	ふ
UNDO_OR_REWIND
EXPECT_PREEDIT	ひ
UNDO_OR_REWIND
EXPECT_PREEDIT	は

# Make sure tapping '6' toggles the last character, not adding a new character.
SEND_KEYS	6
EXPECT_PREEDIT	ひ

# Test with RIGHT key.
RESET_CONTEXT
SEND_KEYS	6
SEND_KEY	RIGHT
SEND_KEYS	6
EXPECT_PREEDIT	はは

RESET_CONTEXT
SEND_KEYS	66
SEND_KEY	RIGHT
SEND_KEYS	6
EXPECT_PREEDIT	ひは

RESET_CONTEXT
SEND_KEYS	666
SEND_KEY	RIGHT
SEND_KEYS	6
EXPECT_PREEDIT	ふは

RESET_CONTEXT
SEND_KEYS	6666
SEND_KEY	RIGHT
SEND_KEYS	6
EXPECT_PREEDIT	へは

RESET_CONTEXT
SEND_KEYS	66666
SEND_KEY	RIGHT
SEND_KEYS	6
EXPECT_PREEDIT	ほは

# Test for Ha-row with voiced mark.
RESET_CONTEXT
SEND_KEYS	6
EXPECT_PREEDIT	は
SEND_KEYS	*
EXPECT_PREEDIT	ば
SEND_KEYS	*
EXPECT_PREEDIT	ぱ
SEND_KEYS	*
EXPECT_PREEDIT	は
SEND_KEYS	*
EXPECT_PREEDIT	ば
SEND_KEYS	*
EXPECT_PREEDIT	ぱ
SEND_KEYS	*
EXPECT_PREEDIT	は
SEND_KEYS	6
EXPECT_PREEDIT	はは

RESET_CONTEXT
SEND_KEYS	6*
EXPECT_PREEDIT	ば
SEND_KEYS	6
EXPECT_PREEDIT	ばは

RESET_CONTEXT
SEND_KEYS	6**
EXPECT_PREEDIT	ぱ
SEND_KEYS	6
EXPECT_PREEDIT	ぱは

RESET_CONTEXT
SEND_KEYS	66
EXPECT_PREEDIT	ひ
SEND_KEYS	*
EXPECT_PREEDIT	び
SEND_KEYS	*
EXPECT_PREEDIT	ぴ
SEND_KEYS	*
EXPECT_PREEDIT	ひ
SEND_KEYS	*
EXPECT_PREEDIT	び
SEND_KEYS	*
EXPECT_PREEDIT	ぴ
SEND_KEYS	*
EXPECT_PREEDIT	ひ
SEND_KEYS	6
EXPECT_PREEDIT	ひは

RESET_CONTEXT
SEND_KEYS	66*
EXPECT_PREEDIT	び
SEND_KEYS	6
EXPECT_PREEDIT	びは

RESET_CONTEXT
SEND_KEYS	66**
EXPECT_PREEDIT	ぴ
SEND_KEYS	6
EXPECT_PREEDIT	ぴは

RESET_CONTEXT
SEND_KEYS	666
EXPECT_PREEDIT	ふ
SEND_KEYS	*
EXPECT_PREEDIT	ぶ
SEND_KEYS	*
EXPECT_PREEDIT	ぷ
SEND_KEYS	*
EXPECT_PREEDIT	ふ
SEND_KEYS	*
EXPECT_PREEDIT	ぶ
SEND_KEYS	*
EXPECT_PREEDIT	ぷ
SEND_KEYS	*
EXPECT_PREEDIT	ふ
SEND_KEYS	6
EXPECT_PREEDIT	ふは

RESET_CONTEXT
SEND_KEYS	666*
EXPECT_PREEDIT	ぶ
SEND_KEYS	6
EXPECT_PREEDIT	ぶは

RESET_CONTEXT
SEND_KEYS	666**
EXPECT_PREEDIT	ぷ
SEND_KEYS	6
EXPECT_PREEDIT	ぷは

RESET_CONTEXT
SEND_KEYS	6666
EXPECT_PREEDIT	へ
SEND_KEYS	*
EXPECT_PREEDIT	べ
SEND_KEYS	*
EXPECT_PREEDIT	ぺ
SEND_KEYS	*
EXPECT_PREEDIT	へ
SEND_KEYS	*
EXPECT_PREEDIT	べ
SEND_KEYS	*
EXPECT_PREEDIT	ぺ
SEND_KEYS	*
EXPECT_PREEDIT	へ
SEND_KEYS	6
EXPECT_PREEDIT	へは

RESET_CONTEXT
SEND_KEYS	6666*
EXPECT_PREEDIT	べ
SEND_KEYS	6
EXPECT_PREEDIT	べは

RESET_CONTEXT
SEND_KEYS	6666**
EXPECT_PREEDIT	ぺ
SEND_KEYS	6
EXPECT_PREEDIT	ぺは

RESET_CONTEXT
SEND_KEYS	66666
EXPECT_PREEDIT	ほ
SEND_KEYS	*
EXPECT_PREEDIT	ぼ
SEND_KEYS	*
EXPECT_PREEDIT	ぽ
SEND_KEYS	*
EXPECT_PREEDIT	ほ
SEND_KEYS	*
EXPECT_PREEDIT	ぼ
SEND_KEYS	*
EXPECT_PREEDIT	ぽ
SEND_KEYS	*
EXPECT_PREEDIT	ほ
SEND_KEYS	6
EXPECT_PREEDIT	ほは

RESET_CONTEXT
SEND_KEYS	66666*
EXPECT_PREEDIT	ぼ
SEND_KEYS	6
EXPECT_PREEDIT	ぼは

RESET_CONTEXT
SEND_KEYS	66666**
EXPECT_PREEDIT	ぽ
SEND_KEYS	6
EXPECT_PREEDIT	ぽは
