| 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 requestAnimationFrame(runTest.bind(this, enableWatchDogWhileDebugging)); | 689 requestAnimationFrame(runTest.bind(this, enableWatchDogWhileDebugging)); |
| 690 } | 690 } |
| 691 | 691 |
| 692 function didEvaluateForTestInFrontend(callId) | 692 function didEvaluateForTestInFrontend(callId) |
| 693 { | 693 { |
| 694 if (callId !== completeTestCallId) | 694 if (callId !== completeTestCallId) |
| 695 return; | 695 return; |
| 696 delete window.completeTestCallId; | 696 delete window.completeTestCallId; |
| 697 if (outputElement && window.quietUntilDone) | 697 if (outputElement && window.quietUntilDone) |
| 698 outputElementParent.appendChild(outputElement); | 698 outputElementParent.appendChild(outputElement); |
| 699 // Close inspector asynchrously to allow caller of this | 699 closeInspectorAndNotifyDone(); |
| 700 // function send response before backend dispatcher and frontend are destroy
ed. | |
| 701 setTimeout(closeInspectorAndNotifyDone, 0); | |
| 702 } | 700 } |
| 703 | 701 |
| 704 function closeInspectorAndNotifyDone() | 702 function closeInspectorAndNotifyDone() |
| 705 { | 703 { |
| 706 if (window._watchDogTimer) | 704 if (window._watchDogTimer) |
| 707 clearTimeout(window._watchDogTimer); | 705 clearTimeout(window._watchDogTimer); |
| 708 | 706 |
| 709 testRunner.closeWebInspector(); | 707 testRunner.closeWebInspector(); |
| 710 setTimeout(function() { | 708 setTimeout(function() { |
| 711 testRunner.notifyDone(); | 709 testRunner.notifyDone(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 evaluateInWebInspector: function(callId, script) | 768 evaluateInWebInspector: function(callId, script) |
| 771 { | 769 { |
| 772 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); | 770 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); |
| 773 }, | 771 }, |
| 774 | 772 |
| 775 display: function() { } | 773 display: function() { } |
| 776 } | 774 } |
| 777 | 775 |
| 778 if (!window.testRunner && window.opener) | 776 if (!window.testRunner && window.opener) |
| 779 window.testRunner = new StandaloneTestRunnerStub(); | 777 window.testRunner = new StandaloneTestRunnerStub(); |
| OLD | NEW |