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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view Created 4 years, 6 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
Index: third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html b/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
index d594be0675b5ec58bcbb6f5527999d43f3de0961..7362794eded6da2202f155a0008701406574b30b 100644
--- a/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
+++ b/third_party/WebKit/LayoutTests/fast/events/simulated-key-state.html
@@ -22,8 +22,7 @@ function test(ctrlKey, altKey, shiftKey, metaKey)
expectedAlt = altKey;
expectedShift = shiftKey;
expectedMeta = metaKey;
- var event = document.createEvent("KeyboardEvents");
- event.initKeyboardEvent("keydown", true, true, document.defaultView, "Enter", 0, ctrlKey, altKey, shiftKey, metaKey, false);
+ var event = new KeyboardEvent("keydown", {bubbles: true, cancelable: true, view: document.defaultView, key: "Enter", ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey, metaKey: metaKey});
link.dispatchEvent(event);
}

Powered by Google App Engine
This is Rietveld 408576698