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

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

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 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
OLDNEW
1 var initialize_WorkspaceTest = function() { 1 var initialize_WorkspaceTest = function() {
2 2
3 InspectorTest.createWorkspace = function(ignoreEvents) 3 InspectorTest.createWorkspace = function(ignoreEvents)
4 { 4 {
5 if (InspectorTest.testFileSystemWorkspaceBinding) 5 if (InspectorTest.testFileSystemWorkspaceBinding)
6 InspectorTest.testFileSystemWorkspaceBinding.dispose(); 6 InspectorTest.testFileSystemWorkspaceBinding.dispose();
7 if (InspectorTest.testNetworkMapping) 7 if (InspectorTest.testNetworkMapping)
8 InspectorTest.testNetworkMapping.dispose(); 8 InspectorTest.testNetworkMapping.dispose();
9 WebInspector.fileSystemMapping.resetForTesting(); 9 WebInspector.fileSystemMapping.resetForTesting();
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 InspectorTest._defaultWorkspaceEventHandler = function(event) 127 InspectorTest._defaultWorkspaceEventHandler = function(event)
128 { 128 {
129 var uiSourceCode = event.data; 129 var uiSourceCode = event.data;
130 var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); 130 var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
131 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger && !networkURL) 131 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger && !networkURL)
132 return; 132 return;
133 if (uiSourceCode.project().type() === WebInspector.projectTypes.Service) 133 if (uiSourceCode.project().type() === WebInspector.projectTypes.Service)
134 return; 134 return;
135 InspectorTest.addResult("Workspace event: " + event.type + ": " + uiSourceCo de.uri() + "."); 135 InspectorTest.addResult("Workspace event: " + event.type + ": " + uiSourceCo de.url() + ".");
136 } 136 }
137 137
138 InspectorTest.uiSourceCodeURL = function(uiSourceCode) 138 InspectorTest.uiSourceCodeURL = function(uiSourceCode)
139 { 139 {
140 return uiSourceCode.originURL().replace(/.*LayoutTests/, "LayoutTests"); 140 return uiSourceCode.url().replace(/.*LayoutTests/, "LayoutTests");
141 } 141 }
142 142
143 InspectorTest.dumpUISourceCode = function(uiSourceCode, callback) 143 InspectorTest.dumpUISourceCode = function(uiSourceCode, callback)
144 { 144 {
145 InspectorTest.addResult("UISourceCode: " + InspectorTest.uiSourceCodeURL(uiS ourceCode)); 145 InspectorTest.addResult("UISourceCode: " + InspectorTest.uiSourceCodeURL(uiS ourceCode));
146 if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script || uiSo urceCode.contentType() === WebInspector.resourceTypes.Document) 146 if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script || uiSo urceCode.contentType() === WebInspector.resourceTypes.Document)
147 InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCo de.project().type() === WebInspector.projectTypes.ContentScripts)); 147 InspectorTest.addResult("UISourceCode is content script: " + (uiSourceCo de.project().type() === WebInspector.projectTypes.ContentScripts));
148 uiSourceCode.requestContent(didRequestContent); 148 uiSourceCode.requestContent(didRequestContent);
149 149
150 function didRequestContent(content, contentEncoded) 150 function didRequestContent(content, contentEncoded)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 function uiSourceCodeAdded(event) 187 function uiSourceCodeAdded(event)
188 { 188 {
189 if (event.data.name() === name) { 189 if (event.data.name() === name) {
190 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Ev ents.UISourceCodeAdded, uiSourceCodeAdded); 190 WebInspector.workspace.removeEventListener(WebInspector.Workspace.Ev ents.UISourceCodeAdded, uiSourceCodeAdded);
191 setImmediate(callback); 191 setImmediate(callback);
192 } 192 }
193 } 193 }
194 } 194 }
195 195
196 }; 196 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698