Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js |
| index ec05a3ca5500978c1d2301bf4a222a464f34ac35..4f0e2af771b362a5f19fbe6efc60d5b8725a941a 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js |
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js |
| @@ -23,8 +23,12 @@ InspectorTest.evaluateInConsole = function(code, callback, dontForceMainContext) |
| var consoleView = WebInspector.ConsoleView.instance(); |
| consoleView.visible = true; |
| consoleView._prompt.setText(code); |
| - var event = document.createEvent("KeyboardEvent"); |
| - event.initKeyboardEvent("keydown", true, true, null, "Enter", ""); |
| + var event = new KeyboardEvent("keydown", |
| + { key: "Enter", |
| + keyIdentifier: "Enter", |
| + bubbles: true, |
| + cancelable: true |
| + }); |
|
caseq
2016/06/10 18:59:11
reformat to use indent of 4:
var event = new Keybo
dtapuska
2016/06/10 20:25:43
Done. I believe keyIdentifier is kind of needed un
|
| consoleView._prompt.proxyElementForTests().dispatchEvent(event); |
| InspectorTest.addConsoleViewSniffer(function(commandResult) { |
| callback(commandResult.toMessageElement().deepTextContent()); |