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

Unified Diff: ui/views/controls/combobox/combobox_unittest.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 5 months 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
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox_unittest.cc
diff --git a/ui/views/controls/combobox/combobox_unittest.cc b/ui/views/controls/combobox/combobox_unittest.cc
index e7df215f51f474c1c4ec06ed60f8c5e42c31bc58..5621525586692f1c5ed2919b3396b69602102f24 100644
--- a/ui/views/controls/combobox/combobox_unittest.cc
+++ b/ui/views/controls/combobox/combobox_unittest.cc
@@ -245,7 +245,7 @@ class ComboboxTest : public ViewsTestBase {
}
void SendKeyEventWithType(ui::KeyboardCode key_code, ui::EventType type) {
- ui::KeyEvent event(type, key_code, 0, false);
+ ui::KeyEvent event(type, key_code, ui::EF_NONE);
widget_->GetInputMethod()->DispatchKeyEvent(event);
}
@@ -624,17 +624,17 @@ TEST_F(ComboboxTest, ConsumingPressKeyEvents) {
InitCombobox(NULL);
EXPECT_FALSE(combobox_->OnKeyPressed(
- ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, 0, false)));
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, ui::EF_NONE)));
EXPECT_FALSE(combobox_->OnKeyPressed(
- ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, 0, false)));
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE)));
// When the combobox's style is STYLE_ACTION, pressing events of a space key
// or an enter key will be consumed.
combobox_->SetStyle(Combobox::STYLE_ACTION);
EXPECT_TRUE(combobox_->OnKeyPressed(
- ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, 0, false)));
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, ui::EF_NONE)));
EXPECT_TRUE(combobox_->OnKeyPressed(
- ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, 0, false)));
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE)));
}
TEST_F(ComboboxTest, ContentWidth) {
« no previous file with comments | « ui/platform_window/x11/x11_window.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698