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

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

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 var initialize_ResourceTest = function() { 1 var initialize_ResourceTest = function() {
2 2
3 InspectorTest.HARPropertyFormatters = { 3 InspectorTest.HARPropertyFormatters = {
4 bodySize: "formatAsTypeName", 4 bodySize: "formatAsTypeName",
5 compression: "formatAsTypeName", 5 compression: "formatAsTypeName",
6 connection: "formatAsTypeName", 6 connection: "formatAsTypeName",
7 headers: "formatAsTypeName", 7 headers: "formatAsTypeName",
8 headersSize: "formatAsTypeName", 8 headersSize: "formatAsTypeName",
9 id: "formatAsTypeName", 9 id: "formatAsTypeName",
10 onContentLoad: "formatAsTypeName", 10 onContentLoad: "formatAsTypeName",
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return; 67 return;
68 callback(sourceFrame); 68 callback(sourceFrame);
69 reported = true; 69 reported = true;
70 } 70 }
71 71
72 function showResourceCallback() 72 function showResourceCallback()
73 { 73 {
74 var resource = InspectorTest.resourceMatchingURL(resourceURL); 74 var resource = InspectorTest.resourceMatchingURL(resourceURL);
75 if (!resource) 75 if (!resource)
76 return; 76 return;
77 WebInspector.panels.resources.showResource(resource, 1); 77 WebInspector.inspectorView.panel("resources").showResource(resource, 1);
78 var sourceFrame = WebInspector.panels.resources._resourceViewForResource (resource); 78 var sourceFrame = WebInspector.inspectorView.panel("resources")._resourc eViewForResource(resource);
79 if (sourceFrame.loaded) 79 if (sourceFrame.loaded)
80 callbackWrapper(sourceFrame); 80 callbackWrapper(sourceFrame);
81 else 81 else
82 InspectorTest.addSniffer(sourceFrame, "onTextEditorContentLoaded", c allbackWrapper.bind(null, sourceFrame)); 82 InspectorTest.addSniffer(sourceFrame, "onTextEditorContentLoaded", c allbackWrapper.bind(null, sourceFrame));
83 } 83 }
84 InspectorTest.runAfterResourcesAreFinished([resourceURL], showResourceCallba ck); 84 InspectorTest.runAfterResourcesAreFinished([resourceURL], showResourceCallba ck);
85 } 85 }
86 86
87 InspectorTest.resourceMatchingURL = function(resourceURL) 87 InspectorTest.resourceMatchingURL = function(resourceURL)
88 { 88 {
89 var result = null; 89 var result = null;
90 WebInspector.resourceTreeModel.forAllResources(visit); 90 WebInspector.resourceTreeModel.forAllResources(visit);
91 function visit(resource) 91 function visit(resource)
92 { 92 {
93 if (resource.url.indexOf(resourceURL) !== -1) { 93 if (resource.url.indexOf(resourceURL) !== -1) {
94 result = resource; 94 result = resource;
95 return true; 95 return true;
96 } 96 }
97 } 97 }
98 return result; 98 return result;
99 } 99 }
100 100
101 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698