OLD | NEW |
1 var initialize_InspectorTest = function() { | 1 var initialize_InspectorTest = function() { |
2 | 2 |
3 var results = []; | 3 var results = []; |
4 var resultsSynchronized = false; | 4 var resultsSynchronized = false; |
5 | 5 |
6 function consoleOutputHook(messageType) | 6 function consoleOutputHook(messageType) |
7 { | 7 { |
8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 8 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
9 } | 9 } |
10 | 10 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 if (enableWatchDogWhileDebugging) { | 643 if (enableWatchDogWhileDebugging) { |
644 function watchDog() | 644 function watchDog() |
645 { | 645 { |
646 console.log("Internal watchdog triggered at 20 seconds. Test timed o
ut."); | 646 console.log("Internal watchdog triggered at 20 seconds. Test timed o
ut."); |
647 closeInspectorAndNotifyDone(); | 647 closeInspectorAndNotifyDone(); |
648 } | 648 } |
649 window._watchDogTimer = setTimeout(watchDog, 20000); | 649 window._watchDogTimer = setTimeout(watchDog, 20000); |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
| 653 function runTestAfterDisplay(enableWatchDogWhileDebugging) |
| 654 { |
| 655 if (!window.testRunner) |
| 656 return; |
| 657 |
| 658 testRunner.waitUntilDone(); |
| 659 requestAnimationFrame(runTest.bind(this, enableWatchDogWhileDebugging)); |
| 660 } |
| 661 |
653 function didEvaluateForTestInFrontend(callId) | 662 function didEvaluateForTestInFrontend(callId) |
654 { | 663 { |
655 if (callId !== completeTestCallId) | 664 if (callId !== completeTestCallId) |
656 return; | 665 return; |
657 delete window.completeTestCallId; | 666 delete window.completeTestCallId; |
658 if (outputElement && window.quietUntilDone) | 667 if (outputElement && window.quietUntilDone) |
659 outputElementParent.appendChild(outputElement); | 668 outputElementParent.appendChild(outputElement); |
660 // Close inspector asynchrously to allow caller of this | 669 // Close inspector asynchrously to allow caller of this |
661 // function send response before backend dispatcher and frontend are destroy
ed. | 670 // function send response before backend dispatcher and frontend are destroy
ed. |
662 setTimeout(closeInspectorAndNotifyDone, 0); | 671 setTimeout(closeInspectorAndNotifyDone, 0); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 evaluateInWebInspector: function(callId, script) | 740 evaluateInWebInspector: function(callId, script) |
732 { | 741 { |
733 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); | 742 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); |
734 }, | 743 }, |
735 | 744 |
736 display: function() { } | 745 display: function() { } |
737 } | 746 } |
738 | 747 |
739 if (!window.testRunner && window.opener) | 748 if (!window.testRunner && window.opener) |
740 window.testRunner = new StandaloneTestRunnerStub(); | 749 window.testRunner = new StandaloneTestRunnerStub(); |
OLD | NEW |