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); |
} |