| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 InspectorTest.check = function(passCondition, failureText) | 89 InspectorTest.check = function(passCondition, failureText) |
| 90 { | 90 { |
| 91 if (!passCondition) | 91 if (!passCondition) |
| 92 InspectorTest.addResult("FAIL: " + failureText); | 92 InspectorTest.addResult("FAIL: " + failureText); |
| 93 } | 93 } |
| 94 | 94 |
| 95 InspectorTest.addResult = function(text) | 95 InspectorTest.addResult = function(text) |
| 96 { | 96 { |
| 97 if (InspectorTest._resultBufferring) { |
| 98 InspectorTest._resultBufferringContent += text + "\n"; |
| 99 return; |
| 100 } |
| 97 results.push(text); | 101 results.push(text); |
| 98 if (resultsSynchronized) | 102 if (resultsSynchronized) |
| 99 InspectorTest.Output.addResult(text); | 103 InspectorTest.Output.addResult(text); |
| 100 else { | 104 else { |
| 101 InspectorTest.Output.clearResults(); | 105 InspectorTest.Output.clearResults(); |
| 102 for (var i = 0; i < results.length; ++i) | 106 for (var i = 0; i < results.length; ++i) |
| 103 InspectorTest.Output.addResult(results[i]); | 107 InspectorTest.Output.addResult(results[i]); |
| 104 resultsSynchronized = true; | 108 resultsSynchronized = true; |
| 105 } | 109 } |
| 106 } | 110 } |
| 107 | 111 |
| 112 InspectorTest.beginResultBufferring = function() |
| 113 { |
| 114 InspectorTest._resultBufferring = true; |
| 115 InspectorTest._resultBufferringContent = ""; |
| 116 } |
| 117 |
| 118 InspectorTest.endResultBufferring = function() |
| 119 { |
| 120 var result = InspectorTest._resultBufferringContent || ""; |
| 121 delete InspectorTest._resultBufferring; |
| 122 delete InspectorTest._resultBufferringContent; |
| 123 return result; |
| 124 } |
| 125 |
| 108 InspectorTest.addResults = function(textArray) | 126 InspectorTest.addResults = function(textArray) |
| 109 { | 127 { |
| 110 if (!textArray) | 128 if (!textArray) |
| 111 return; | 129 return; |
| 112 for (var i = 0, size = textArray.length; i < size; ++i) | 130 for (var i = 0, size = textArray.length; i < size; ++i) |
| 113 InspectorTest.addResult(textArray[i]); | 131 InspectorTest.addResult(textArray[i]); |
| 114 } | 132 } |
| 115 | 133 |
| 116 function onError(event) | 134 function onError(event) |
| 117 { | 135 { |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 evaluateInWebInspector: function(callId, script) | 652 evaluateInWebInspector: function(callId, script) |
| 635 { | 653 { |
| 636 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); | 654 window.opener.postMessage(["evaluateInWebInspector", callId, script], "*
"); |
| 637 }, | 655 }, |
| 638 | 656 |
| 639 display: function() { } | 657 display: function() { } |
| 640 } | 658 } |
| 641 | 659 |
| 642 if (!window.testRunner && window.opener) | 660 if (!window.testRunner && window.opener) |
| 643 window.testRunner = new StandaloneTestRunnerStub(); | 661 window.testRunner = new StandaloneTestRunnerStub(); |
| OLD | NEW |