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

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

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 InspectorTest.uiSourceCodeURL = function(uiSourceCode) 138 InspectorTest.uiSourceCodeURL = function(uiSourceCode)
139 { 139 {
140 return uiSourceCode.url().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().then(didRequestContent);
149 149
150 function didRequestContent(content, contentEncoded) 150 function didRequestContent(content, contentEncoded)
151 { 151 {
152 InspectorTest.addResult("Highlighter type: " + WebInspector.NetworkProje ct.uiSourceCodeMimeType(uiSourceCode)); 152 InspectorTest.addResult("Highlighter type: " + WebInspector.NetworkProje ct.uiSourceCodeMimeType(uiSourceCode));
153 InspectorTest.addResult("UISourceCode content: " + content); 153 InspectorTest.addResult("UISourceCode content: " + content);
154 callback(); 154 callback();
155 } 155 }
156 } 156 }
157 157
158 InspectorTest.fileSystemUISourceCodes = function() 158 InspectorTest.fileSystemUISourceCodes = function()
(...skipping 28 matching lines...) Expand all
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