| 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.InspectorBackend.Connection.prototype._dumpProtocolMessage = testRu
nner.logToStderr.bind(testRunner); |
| 28 InspectorBackendClass.Options.dumpInspectorProtocolMessages = 1; | 28 Protocol.InspectorBackend.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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 _output("[page] " + text); | 1225 _output("[page] " + text); |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 function _output(result) | 1228 function _output(result) |
| 1229 { | 1229 { |
| 1230 if (!outputElement) | 1230 if (!outputElement) |
| 1231 createOutputElement(); | 1231 createOutputElement(); |
| 1232 outputElement.appendChild(document.createTextNode(result)); | 1232 outputElement.appendChild(document.createTextNode(result)); |
| 1233 outputElement.appendChild(document.createElement("br")); | 1233 outputElement.appendChild(document.createElement("br")); |
| 1234 } | 1234 } |
| OLD | NEW |