OLD | NEW |
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) { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 342 } |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 InspectorTest.waitUntilConsoleEditorLoaded = function() | 346 InspectorTest.waitUntilConsoleEditorLoaded = function() |
347 { | 347 { |
348 var fulfill; | 348 var fulfill; |
349 var promise = new Promise(x => fulfill = x); | 349 var promise = new Promise(x => fulfill = x); |
350 var editor = WebInspector.ConsoleView.instance()._prompt._editor; | 350 var editor = WebInspector.ConsoleView.instance()._prompt._editor; |
351 if (editor) | 351 if (editor) |
352 fulfill(); | 352 fulfill(editor); |
353 else | 353 else |
354 InspectorTest.addSniffer(WebInspector.ConsolePrompt.prototype, "_editorS
etForTest", _ => fulfill()) | 354 InspectorTest.addSniffer(WebInspector.ConsolePrompt.prototype, "_editorS
etForTest", _ => fulfill(editor)) |
355 return promise; | 355 return promise; |
356 } | 356 } |
357 | 357 |
358 InspectorTest.waitUntilMessageReceived = function(callback) | 358 InspectorTest.waitUntilMessageReceived = function(callback) |
359 { | 359 { |
360 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", callback,
false); | 360 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", callback,
false); |
361 } | 361 } |
362 | 362 |
363 InspectorTest.waitUntilMessageReceivedPromise = function() | 363 InspectorTest.waitUntilMessageReceivedPromise = function() |
364 { | 364 { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 if (consoleView._visibleViewMessages.length === expectedCount) { | 415 if (consoleView._visibleViewMessages.length === expectedCount) { |
416 InspectorTest.addResult("Message count: " + expectedCount); | 416 InspectorTest.addResult("Message count: " + expectedCount); |
417 callback(); | 417 callback(); |
418 } else { | 418 } else { |
419 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); | 419 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); |
420 } | 420 } |
421 } | 421 } |
422 } | 422 } |
423 | 423 |
424 } | 424 } |
OLD | NEW |