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

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

Issue 2850333002: DevTools: Promisify Profiler and HeapProfiler domains (Closed)
Patch Set: addressing comments 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/inspector/profiler/heap-snapshot-inspect-dom-wrapper.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 // This goes before everything else to keep console message line number invarian t. 1 // This goes before everything else to keep console message line number invarian t.
2 var lastXHRIndex = 0; 2 var lastXHRIndex = 0;
3 function xhrLoadedCallback() 3 function xhrLoadedCallback()
4 { 4 {
5 // We need to make sure the console message text is unique so that we don't end up with repeat count update only. 5 // We need to make sure the console message text is unique so that we don't end up with repeat count update only.
6 console.log("XHR loaded: " + (++lastXHRIndex)); 6 console.log("XHR loaded: " + (++lastXHRIndex));
7 } 7 }
8 8
9 function makeSimpleXHR(method, url, async, callback) 9 function makeSimpleXHR(method, url, async, callback)
10 { 10 {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 InspectorTest.makeFetch = function(url, requestInitializer, callback) 200 InspectorTest.makeFetch = function(url, requestInitializer, callback)
201 { 201 {
202 InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer] ).then(callback); 202 InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer] ).then(callback);
203 } 203 }
204 204
205 InspectorTest.clearNetworkCache = function(finishedCallback) 205 InspectorTest.clearNetworkCache = function(finishedCallback)
206 { 206 {
207 // This turns cache off and then on, effectively clearning the cache. 207 // This turns cache off and then on, effectively clearning the cache.
208 var networkAgent = InspectorTest.NetworkAgent; 208 var networkAgent = InspectorTest.NetworkAgent;
209 var promise = networkAgent.setCacheDisabled(true); 209 var promise = networkAgent.setCacheDisabled(true);
210 promise.then(networkAgent.setCacheDisabled.bind(networkAgent, false)); 210 promise.then(() => networkAgent.setCacheDisabled(false));
211 promise.then(finishedCallback); 211 promise.then(finishedCallback);
212 } 212 }
213 213
214 InspectorTest.HARPropertyFormatters = { 214 InspectorTest.HARPropertyFormatters = {
215 bodySize: "formatAsTypeName", 215 bodySize: "formatAsTypeName",
216 compression: "formatAsTypeName", 216 compression: "formatAsTypeName",
217 connection: "formatAsTypeName", 217 connection: "formatAsTypeName",
218 headers: "formatAsTypeName", 218 headers: "formatAsTypeName",
219 headersSize: "formatAsTypeName", 219 headersSize: "formatAsTypeName",
220 id: "formatAsTypeName", 220 id: "formatAsTypeName",
221 onContentLoad: "formatAsTypeName", 221 onContentLoad: "formatAsTypeName",
222 onLoad: "formatAsTypeName", 222 onLoad: "formatAsTypeName",
223 receive: "formatAsTypeName", 223 receive: "formatAsTypeName",
224 startedDateTime: "formatAsRecentTime", 224 startedDateTime: "formatAsRecentTime",
225 time: "formatAsTypeName", 225 time: "formatAsTypeName",
226 timings: "formatAsTypeName", 226 timings: "formatAsTypeName",
227 version: "formatAsTypeName", 227 version: "formatAsTypeName",
228 wait: "formatAsTypeName", 228 wait: "formatAsTypeName",
229 _transferSize: "formatAsTypeName", 229 _transferSize: "formatAsTypeName",
230 _error: "skip" 230 _error: "skip"
231 }; 231 };
232 // addObject checks own properties only, so make a deep copy rather than use pro totype. 232 // addObject checks own properties only, so make a deep copy rather than use pro totype.
233 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto rTest.HARPropertyFormatters)); 233 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto rTest.HARPropertyFormatters));
234 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; 234 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName";
235 235
236 }; 236 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-inspect-dom-wrapper.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698