OLD | NEW |
1 function scheduleTestFunction() | 1 function scheduleTestFunction() |
2 { | 2 { |
3 setTimeout(testFunction, 0); | 3 setTimeout(testFunction, 0); |
4 } | 4 } |
5 | 5 |
6 var initialize_DebuggerTest = function() { | 6 var initialize_DebuggerTest = function() { |
7 | 7 |
8 InspectorTest.preloadPanel("sources"); | 8 InspectorTest.preloadPanel("sources"); |
9 | 9 |
10 InspectorTest.startDebuggerTest = function(callback, quiet) | 10 InspectorTest.startDebuggerTest = function(callback, quiet) |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 { | 372 { |
373 var panel = WebInspector.panels.sources; | 373 var panel = WebInspector.panels.sources; |
374 panel.showUISourceCode(uiSourceCode); | 374 panel.showUISourceCode(uiSourceCode); |
375 var sourceFrame = panel.visibleView; | 375 var sourceFrame = panel.visibleView; |
376 if (sourceFrame.loaded) | 376 if (sourceFrame.loaded) |
377 callback(sourceFrame); | 377 callback(sourceFrame); |
378 else | 378 else |
379 InspectorTest.addSniffer(sourceFrame, "onTextEditorContentSet", callback
&& callback.bind(null, sourceFrame)); | 379 InspectorTest.addSniffer(sourceFrame, "onTextEditorContentSet", callback
&& callback.bind(null, sourceFrame)); |
380 }; | 380 }; |
381 | 381 |
| 382 InspectorTest.showUISourceCodePromise = function(uiSourceCode) |
| 383 { |
| 384 var fulfill; |
| 385 var promise = new Promise(x => fulfill = x); |
| 386 InspectorTest.showUISourceCode(uiSourceCode, fulfill); |
| 387 return promise; |
| 388 } |
| 389 |
382 InspectorTest.showScriptSource = function(scriptName, callback) | 390 InspectorTest.showScriptSource = function(scriptName, callback) |
383 { | 391 { |
384 InspectorTest.waitForScriptSource(scriptName, onScriptSource); | 392 InspectorTest.waitForScriptSource(scriptName, onScriptSource); |
385 | 393 |
386 function onScriptSource(uiSourceCode) | 394 function onScriptSource(uiSourceCode) |
387 { | 395 { |
388 InspectorTest.showUISourceCode(uiSourceCode, callback); | 396 InspectorTest.showUISourceCode(uiSourceCode, callback); |
389 } | 397 } |
390 }; | 398 }; |
391 | 399 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg
erModel.fromTarget(target)); | 595 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg
erModel.fromTarget(target)); |
588 threadsPane._onListItemClick(listItem); | 596 threadsPane._onListItemClick(listItem); |
589 } | 597 } |
590 | 598 |
591 InspectorTest.evaluateOnCurrentCallFrame = function(code) | 599 InspectorTest.evaluateOnCurrentCallFrame = function(code) |
592 { | 600 { |
593 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); | 601 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal
lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ))
); |
594 } | 602 } |
595 | 603 |
596 }; | 604 }; |
OLD | NEW |