Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js

Issue 2873843003: [DevTools] Restore tree selection after reload (Closed)
Patch Set: [DevTools] Restore tree selection after reload Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-selection-on-reload.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 523 }
524 524
525 InspectorTest.navigatePromise = function(url) 525 InspectorTest.navigatePromise = function(url)
526 { 526 {
527 var fulfill; 527 var fulfill;
528 var promise = new Promise(callback => fulfill = callback); 528 var promise = new Promise(callback => fulfill = callback);
529 InspectorTest.navigate(url, fulfill); 529 InspectorTest.navigate(url, fulfill);
530 return promise; 530 return promise;
531 } 531 }
532 532
533 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad, script Preprocessor) 533 InspectorTest.hardReloadPage = function(callback, scriptToEvaluateOnLoad)
534 { 534 {
535 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad, scrip tPreprocessor); 535 InspectorTest._innerReloadPage(true, callback, scriptToEvaluateOnLoad);
536 } 536 }
537 537
538 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad, scriptPrep rocessor) 538 InspectorTest.reloadPage = function(callback, scriptToEvaluateOnLoad)
539 { 539 {
540 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad, scri ptPreprocessor); 540 InspectorTest._innerReloadPage(false, callback, scriptToEvaluateOnLoad);
541 } 541 }
542 542
543 InspectorTest.reloadPagePromise = function(scriptToEvaluateOnLoad, scriptPreproc essor) 543 InspectorTest.reloadPagePromise = function(scriptToEvaluateOnLoad)
544 { 544 {
545 var fulfill; 545 var fulfill;
546 var promise = new Promise(x => fulfill = x); 546 var promise = new Promise(x => fulfill = x);
547 InspectorTest.reloadPage(fulfill, scriptToEvaluateOnLoad, scriptPreprocessor ); 547 InspectorTest.reloadPage(fulfill, scriptToEvaluateOnLoad);
548 return promise; 548 return promise;
549 } 549 }
550 550
551 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate OnLoad, scriptPreprocessor) 551 InspectorTest._innerReloadPage = function(hardReload, callback, scriptToEvaluate OnLoad)
552 { 552 {
553 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback); 553 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);
554 554
555 if (UI.panels.network) 555 if (UI.panels.network)
556 UI.panels.network._networkLogView.reset(); 556 UI.panels.network._networkLogView.reset();
557 InspectorTest.PageAgent.reload(hardReload, scriptToEvaluateOnLoad, scriptPre processor); 557 InspectorTest.resourceTreeModel.reloadPage(hardReload, scriptToEvaluateOnLoa d);
558 } 558 }
559 559
560 InspectorTest.pageLoaded = function() 560 InspectorTest.pageLoaded = function()
561 { 561 {
562 InspectorTest.addResult("Page reloaded."); 562 InspectorTest.addResult("Page reloaded.");
563 if (InspectorTest._pageLoadedCallback) { 563 if (InspectorTest._pageLoadedCallback) {
564 var callback = InspectorTest._pageLoadedCallback; 564 var callback = InspectorTest._pageLoadedCallback;
565 delete InspectorTest._pageLoadedCallback; 565 delete InspectorTest._pageLoadedCallback;
566 callback(); 566 callback();
567 } 567 }
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 _output("[page] " + text); 1289 _output("[page] " + text);
1290 } 1290 }
1291 1291
1292 function _output(result) 1292 function _output(result)
1293 { 1293 {
1294 if (!outputElement) 1294 if (!outputElement)
1295 createOutputElement(); 1295 createOutputElement();
1296 outputElement.appendChild(document.createTextNode(result)); 1296 outputElement.appendChild(document.createTextNode(result));
1297 outputElement.appendChild(document.createElement("br")); 1297 outputElement.appendChild(document.createElement("br"));
1298 } 1298 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-selection-on-reload.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698