Commit 8f09f1ce authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

ime: Fix incorrect rule-based altgr test.

The event code is incorrect. Should be "KeyA", not "A". Fix the
expectations to match the purpose of the test.

Bug: 1035145
Change-Id: I5f269aea5bae9f441b4021f8c5c5e3ccea1ba6d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371386Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802994}
parent 96091327
...@@ -257,13 +257,13 @@ TEST_F(ImeServiceTest, RuleBasedHandlesAltRight) { ...@@ -257,13 +257,13 @@ TEST_F(ImeServiceTest, RuleBasedHandlesAltRight) {
false, false, false), false, false, false),
base::BindOnce(&TestProcessKeypressForRulebasedCallback, &response)); base::BindOnce(&TestProcessKeypressForRulebasedCallback, &response));
to_engine_remote->ProcessKeypressForRulebased( to_engine_remote->ProcessKeypressForRulebased(
mojom::KeypressInfoForRulebased::New("keydown", "A", false, false, false, mojom::KeypressInfoForRulebased::New("keydown", "KeyA", false, false,
false, true), false, false, true),
base::BindOnce(&TestProcessKeypressForRulebasedCallback, &response)); base::BindOnce(&TestProcessKeypressForRulebasedCallback, &response));
to_engine_remote.FlushForTesting(); to_engine_remote.FlushForTesting();
EXPECT_EQ(response.result, false); EXPECT_EQ(response.result, true);
ASSERT_EQ(0U, response.operations.size()); ASSERT_EQ(1U, response.operations.size());
} }
// Tests that the rule-based Arabic keyboard can work correctly. // Tests that the rule-based Arabic keyboard can work correctly.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment