| OLD | NEW |
| 1 if (window.GCController) | 1 if (window.GCController) |
| 2 GCController.collectAll(); | 2 GCController.collectAll(); |
| 3 var initialize_InspectorTest = function() { | 3 var initialize_InspectorTest = function() { |
| 4 | 4 |
| 5 var results = []; | 5 var results = []; |
| 6 | 6 |
| 7 function consoleOutputHook(messageType) | 7 function consoleOutputHook(messageType) |
| 8 { | 8 { |
| 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
| 10 } | 10 } |
| 11 | 11 |
| 12 window._originalConsoleLog = console.log.bind(console); | 12 window._originalConsoleLog = console.log.bind(console); |
| 13 | 13 |
| 14 console.log = consoleOutputHook.bind(InspectorTest, "log"); | 14 console.log = consoleOutputHook.bind(InspectorTest, "log"); |
| 15 console.error = consoleOutputHook.bind(InspectorTest, "error"); | 15 console.error = consoleOutputHook.bind(InspectorTest, "error"); |
| 16 console.info = consoleOutputHook.bind(InspectorTest, "info"); | 16 console.info = consoleOutputHook.bind(InspectorTest, "info"); |
| 17 console.assert = function(condition, object) | 17 console.assert = function(condition, object) |
| 18 { | 18 { |
| 19 if (condition) | 19 if (condition) |
| 20 return; | 20 return; |
| 21 var message = "Assertion failed: " + (typeof object !== "undefined" ? object
: ""); | 21 var message = "Assertion failed: " + (typeof object !== "undefined" ? object
: ""); |
| 22 InspectorTest.addResult(new Error(message).stack); | 22 InspectorTest.addResult(new Error(message).stack); |
| 23 } | 23 } |
| 24 | 24 |
| 25 InspectorTest.startDumpingProtocolMessages = function() | 25 InspectorTest.startDumpingProtocolMessages = function() |
| 26 { | 26 { |
| 27 InspectorBackendClass.Connection.prototype._dumpProtocolMessage = testRunner
.logToStderr.bind(testRunner); | 27 Protocol.Target.prototype._dumpProtocolMessage = testRunner.logToStderr.bind
(testRunner); |
| 28 InspectorBackendClass.Options.dumpInspectorProtocolMessages = 1; | 28 Protocol.Options.dumpInspectorProtocolMessages = 1; |
| 29 } | 29 } |
| 30 | 30 |
| 31 InspectorTest.completeTest = function() | 31 InspectorTest.completeTest = function() |
| 32 { | 32 { |
| 33 InspectorTest.RuntimeAgent.evaluate("completeTest(\"" + escape(JSON.stringif
y(results)) + "\")", "test"); | 33 InspectorTest.RuntimeAgent.evaluate("completeTest(\"" + escape(JSON.stringif
y(results)) + "\")", "test"); |
| 34 } | 34 } |
| 35 | 35 |
| 36 InspectorTest.flushResults = function() | 36 InspectorTest.flushResults = function() |
| 37 { | 37 { |
| 38 InspectorTest.RuntimeAgent.evaluate("flushResults(\"" + escape(JSON.stringif
y(results)) + "\")", "test"); | 38 InspectorTest.RuntimeAgent.evaluate("flushResults(\"" + escape(JSON.stringif
y(results)) + "\")", "test"); |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 _output("[page] " + text); | 1164 _output("[page] " + text); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 function _output(result) | 1167 function _output(result) |
| 1168 { | 1168 { |
| 1169 if (!outputElement) | 1169 if (!outputElement) |
| 1170 createOutputElement(); | 1170 createOutputElement(); |
| 1171 outputElement.appendChild(document.createTextNode(result)); | 1171 outputElement.appendChild(document.createTextNode(result)); |
| 1172 outputElement.appendChild(document.createElement("br")); | 1172 outputElement.appendChild(document.createElement("br")); |
| 1173 } | 1173 } |
| OLD | NEW |