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

Unified Diff: chrome/test/chromedriver/key_converter_unittest.cc

Issue 2482283003: [chromedriver] Don't generate char events on Mac for KeyConverter.AllShorthandKeys. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/key_converter_unittest.cc
diff --git a/chrome/test/chromedriver/key_converter_unittest.cc b/chrome/test/chromedriver/key_converter_unittest.cc
index 9585be69555199a077e8e8424c03a52b0d3adb86..29a0ca540be1078d32d4e1aa762b4a641e09e74d 100644
--- a/chrome/test/chromedriver/key_converter_unittest.cc
+++ b/chrome/test/chromedriver/key_converter_unittest.cc
@@ -275,8 +275,20 @@ TEST(KeyConverter, MAYBE_AllShorthandKeys) {
->SetText("\r", "\r")
->Generate(&key_events);
builder.Generate(&key_events);
- builder.SetKeyCode(ui::VKEY_TAB)->SetText("\t", "\t")->Generate(&key_events);
- builder.SetKeyCode(ui::VKEY_BACK)->SetText("\b", "\b")->Generate(&key_events);
+ builder.SetKeyCode(ui::VKEY_TAB)->SetText("\t", "\t");
+#if defined(USE_AURA) || defined(OS_LINUX)
+ builder.Generate(&key_events);
+#else
+ key_events.push_back(builder.SetType(kRawKeyDownEventType)->Build());
+ key_events.push_back(builder.SetType(kKeyUpEventType)->Build());
+#endif
+ builder.SetKeyCode(ui::VKEY_BACK)->SetText("\b", "\b");
+#if defined(USE_AURA) || defined(OS_LINUX)
+ builder.Generate(&key_events);
+#else
+ key_events.push_back(builder.SetType(kRawKeyDownEventType)->Build());
+ key_events.push_back(builder.SetType(kKeyUpEventType)->Build());
+#endif
builder.SetKeyCode(ui::VKEY_SPACE)->SetText(" ", " ")->Generate(&key_events);
CheckEventsReleaseModifiers("\n\r\n\t\b ", key_events);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698