Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 2505943002: MacViews: Fix accelerator handling while Omnibox is in focus. (Closed)
Patch Set: Fix tapted's review issues. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/textfield/textfield_unittest.cc
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index 13e2b3da54dfca41c97d94a5298f8379ffd172ca..b27b90e41a3c9beb95f90336a69129a3b250adbd 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -447,6 +447,7 @@ class TextfieldTest : public ViewsTestBase, public TextfieldController {
event_generator_.reset(
new ui::test::EventGenerator(widget_->GetNativeWindow()));
+ event_generator_->set_target(ui::test::EventGenerator::Target::WINDOW);
}
ui::MenuModel* GetContextMenuModel() {
test_api_->UpdateContextMenu();
@@ -1252,13 +1253,7 @@ TEST_F(TextfieldTest, OnKeyPress) {
// F20 key won't be handled.
SendKeyEvent(ui::VKEY_F20);
-#if defined(OS_MACOSX)
- // On Mac, key combinations that don't map to editing commands are forwarded
- // on to the next responder, usually ending up at the window, which will beep.
- EXPECT_FALSE(textfield_->key_received());
-#else
EXPECT_TRUE(textfield_->key_received());
-#endif
EXPECT_FALSE(textfield_->key_handled());
textfield_->clear();
}

Powered by Google App Engine
This is Rietveld 408576698