| OLD | NEW |
| 1 if (window.GCController) | 1 if (window.GCController) |
| 2 GCController.collectAll(); | 2 GCController.collectAll(); |
| 3 | 3 |
| 4 var initialize_InspectorTest = function() { | 4 var initialize_InspectorTest = function() { |
| 5 Protocol.InspectorBackend.Options.suppressRequestErrors = true; | 5 Protocol.InspectorBackend.Options.suppressRequestErrors = true; |
| 6 var results = []; | 6 var results = []; |
| 7 | 7 |
| 8 function consoleOutputHook(messageType) | 8 function consoleOutputHook(messageType) |
| 9 { | 9 { |
| 10 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 10 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 if (a < b) | 462 if (a < b) |
| 463 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a
+ " < " + b); | 463 InspectorTest.addResult("FAILED: " + (message ? message + ": " : "") + a
+ " < " + b); |
| 464 } | 464 } |
| 465 | 465 |
| 466 InspectorTest.navigate = function(url, callback) | 466 InspectorTest.navigate = function(url, callback) |
| 467 { | 467 { |
| 468 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); | 468 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); |
| 469 InspectorTest.evaluateInPage("window.location.replace('" + url + "')"); | 469 InspectorTest.evaluateInPage("window.location.replace('" + url + "')"); |
| 470 } | 470 } |
| 471 | 471 |
| 472 InspectorTest.navigatePromise = function(url) |
| 473 { |
| 474 var fulfill; |
| 475 var promise = new Promise(callback => fulfill = callback); |
| 476 InspectorTest.navigate(url, fulfill); |
| 477 return promise; |
| 478 } |
| 479 |
| 472 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad, script
Preprocessor) | 480 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad, script
Preprocessor) |
| 473 { | 481 { |
| 474 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad, scrip
tPreprocessor); | 482 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad, scrip
tPreprocessor); |
| 475 } | 483 } |
| 476 | 484 |
| 477 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep
rocessor) | 485 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep
rocessor) |
| 478 { | 486 { |
| 479 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri
ptPreprocessor); | 487 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri
ptPreprocessor); |
| 480 } | 488 } |
| 481 | 489 |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 _output("[page] " + text); | 1237 _output("[page] " + text); |
| 1230 } | 1238 } |
| 1231 | 1239 |
| 1232 function _output(result) | 1240 function _output(result) |
| 1233 { | 1241 { |
| 1234 if (!outputElement) | 1242 if (!outputElement) |
| 1235 createOutputElement(); | 1243 createOutputElement(); |
| 1236 outputElement.appendChild(document.createTextNode(result)); | 1244 outputElement.appendChild(document.createTextNode(result)); |
| 1237 outputElement.appendChild(document.createElement("br")); | 1245 outputElement.appendChild(document.createElement("br")); |
| 1238 } | 1246 } |
| OLD | NEW |