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

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

Issue 649343002: event_sender: Keep keyIdentifier in keypress event for Enter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not not not but not Created 6 years, 2 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 7a2b07f17e77c4feadaa9473187deccdc414f017..d8c007301bf4e82d9fd9ee4a0ae3da77a94776e9 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -1365,7 +1365,11 @@ void EventSender::KeyDown(const std::string& code_str,
if (generate_char) {
WebKeyboardEvent event_char = event_up;
event_char.type = WebInputEvent::Char;
- event_char.keyIdentifier[0] = '\0';
+ // keyIdentifier is an empty string, unless the Enter key was pressed.
+ // This behavior is not standard (keyIdentifier itself is not even a
+ // standard any more), but it matches the actual behavior in Blink.
+ if (code != ui::VKEY_RETURN)
+ event_char.keyIdentifier[0] = '\0';
view_->handleInputEvent(event_char);
}
« 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