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 } |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad, script
Preprocessor) | 416 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad, script
Preprocessor) |
417 { | 417 { |
418 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad, scrip
tPreprocessor); | 418 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad, scrip
tPreprocessor); |
419 } | 419 } |
420 | 420 |
421 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep
rocessor) | 421 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep
rocessor) |
422 { | 422 { |
423 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri
ptPreprocessor); | 423 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri
ptPreprocessor); |
424 } | 424 } |
425 | 425 |
| 426 InspectorTest.reloadPagePromise = function(scriptToEvaluateOnLoad, scriptPreproc
essor) |
| 427 { |
| 428 var fulfill; |
| 429 var promise = new Promise(x => fulfill = x); |
| 430 InspectorTest.reloadPage(fulfill, scriptToEvaluateOnLoad, scriptPreprocessor
); |
| 431 return promise; |
| 432 } |
| 433 |
426 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate
OnLoad, scriptPreprocessor) | 434 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate
OnLoad, scriptPreprocessor) |
427 { | 435 { |
428 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); | 436 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); |
429 | 437 |
430 if (UI.panels.network) | 438 if (UI.panels.network) |
431 UI.panels.network._networkLogView.reset(); | 439 UI.panels.network._networkLogView.reset(); |
432 InspectorTest.PageAgent.reload(hardReload, scriptToEvaluateOnLoad, scriptPre
processor); | 440 InspectorTest.PageAgent.reload(hardReload, scriptToEvaluateOnLoad, scriptPre
processor); |
433 } | 441 } |
434 | 442 |
435 InspectorTest.pageLoaded = function() | 443 InspectorTest.pageLoaded = function() |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 _output("[page] " + text); | 1173 _output("[page] " + text); |
1166 } | 1174 } |
1167 | 1175 |
1168 function _output(result) | 1176 function _output(result) |
1169 { | 1177 { |
1170 if (!outputElement) | 1178 if (!outputElement) |
1171 createOutputElement(); | 1179 createOutputElement(); |
1172 outputElement.appendChild(document.createTextNode(result)); | 1180 outputElement.appendChild(document.createTextNode(result)); |
1173 outputElement.appendChild(document.createElement("br")); | 1181 outputElement.appendChild(document.createElement("br")); |
1174 } | 1182 } |
OLD | NEW |