The following test fails in mash_unittests but succeeds in ash_unitests (and
ash_unittests --mus).
In the original test, the 'ABC1' events are not delivered to |content|, but
VKEY_RETURN is.
// Fails in mash_unittests, succeeds in ash_unittests.
using Fixture = ash::test::AshTestBase;
TEST_F(Fixture, MashEventRouterBug) {
auto* content = new views::Textfield();
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.context = CurrentContext();
params.bounds = gfx::Rect(0, 0, 800, 800);
auto* widget = new views::Widget();
widget->Init(params);
widget->SetContentsView(content);
widget->Show();
content->RequestFocus();
EXPECT_EQ(content->GetFocusManager()->GetFocusedView(),
content);
ui::test::EventGenerator& generator = GetEventGenerator();
generator.PressKey(ui::KeyboardCode::VKEY_A, 0);
generator.PressKey(ui::KeyboardCode::VKEY_B, 0);
generator.PressKey(ui::KeyboardCode::VKEY_C, 0);
generator.PressKey(ui::KeyboardCode::VKEY_1, 0);
generator.PressKey(ui::KeyboardCode::VKEY_RETURN, 0);
EXPECT_EQ(base::ASCIIToUTF16("abc1"), content->text());
}
Comment 1 by msw@chromium.org
, May 22 2017Labels: Proj-Mustash-Mash
Owner: sadrul@chromium.org