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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2120153003: Remove keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_key_identifier_3a
Patch Set: Rebase Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 var initialize_ConsoleTest = function() { 1 var initialize_ConsoleTest = function() {
2 2
3 InspectorTest.preloadModule("source_frame"); 3 InspectorTest.preloadModule("source_frame");
4 InspectorTest.preloadPanel("console"); 4 InspectorTest.preloadPanel("console");
5 5
6 InspectorTest.selectMainExecutionContext = function() 6 InspectorTest.selectMainExecutionContext = function()
7 { 7 {
8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts(); 8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts();
9 for (var context of executionContexts) { 9 for (var context of executionContexts) {
10 if (context.isDefault) { 10 if (context.isDefault) {
11 WebInspector.context.setFlavor(WebInspector.ExecutionContext, contex t); 11 WebInspector.context.setFlavor(WebInspector.ExecutionContext, contex t);
12 return; 12 return;
13 } 13 }
14 } 14 }
15 } 15 }
16 16
17 InspectorTest.evaluateInConsole = function(code, callback, dontForceMainContext) 17 InspectorTest.evaluateInConsole = function(code, callback, dontForceMainContext)
18 { 18 {
19 if (!dontForceMainContext) 19 if (!dontForceMainContext)
20 InspectorTest.selectMainExecutionContext(); 20 InspectorTest.selectMainExecutionContext();
21 callback = InspectorTest.safeWrap(callback); 21 callback = InspectorTest.safeWrap(callback);
22 22
23 var consoleView = WebInspector.ConsoleView.instance(); 23 var consoleView = WebInspector.ConsoleView.instance();
24 consoleView.visible = true; 24 consoleView.visible = true;
25 consoleView._prompt.setText(code); 25 consoleView._prompt.setText(code);
26 var event = new KeyboardEvent("keydown", { 26 var event = new KeyboardEvent("keydown", {
27 key: "Enter", 27 key: "Enter",
28 keyIdentifier: "Enter",
29 bubbles: true, 28 bubbles: true,
30 cancelable: true 29 cancelable: true
31 }); 30 });
32 consoleView._prompt.proxyElementForTests().dispatchEvent(event); 31 consoleView._prompt.proxyElementForTests().dispatchEvent(event);
33 InspectorTest.addConsoleViewSniffer(function(commandResult) { 32 InspectorTest.addConsoleViewSniffer(function(commandResult) {
34 callback(commandResult.toMessageElement().deepTextContent()); 33 callback(commandResult.toMessageElement().deepTextContent());
35 }); 34 });
36 } 35 }
37 36
38 InspectorTest.addConsoleViewSniffer = function(override, opt_sticky) 37 InspectorTest.addConsoleViewSniffer = function(override, opt_sticky)
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (consoleView._visibleViewMessages.length === expectedCount) { 407 if (consoleView._visibleViewMessages.length === expectedCount) {
409 InspectorTest.addResult("Message count: " + expectedCount); 408 InspectorTest.addResult("Message count: " + expectedCount);
410 callback(); 409 callback();
411 } else { 410 } else {
412 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn); 411 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn);
413 } 412 }
414 } 413 }
415 } 414 }
416 415
417 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698