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

Unified Diff: content/shell/renderer/test_runner/event_sender.cc

Issue 488053002: EventSender::KeyDown(): add "escape" and "backspace" key names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/event_sender.cc
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index f4cf3106f4c323166f84041b301860b8d896cd98..79071bfddfba42e27a0859165e2bf16ab63bdac8 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -1267,6 +1267,10 @@ void EventSender::KeyDown(const std::string& code_str,
code = ui::VKEY_RMENU;
} else if ("numLock" == code_str) {
code = ui::VKEY_NUMLOCK;
+ } else if ("backspace" == code_str) {
+ code = ui::VKEY_BACK;
+ } else if ("escape" == code_str) {
+ code = ui::VKEY_ESCAPE;
} else {
// Compare the input string with the function-key names defined by the
// DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key
@@ -1946,7 +1950,7 @@ void EventSender::GestureEvent(WebInputEvent::Type type,
event.x = current_gesture_location_.x;
event.y = current_gesture_location_.y;
break;
- case WebInputEvent::GestureTap:
+ case WebInputEvent::GestureTap:
{
float tap_count = 1;
float width = 30;
« 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