| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 function makeXHRForJSONArguments(jsonArgs) | 40 function makeXHRForJSONArguments(jsonArgs) |
| 41 { | 41 { |
| 42 var args = JSON.parse(jsonArgs); | 42 var args = JSON.parse(jsonArgs); |
| 43 makeXHR(args.method, args.url, args.async, args.user, args.password, args.he
aders || [], args.withCredentials, args.payload, args.type, xhrLoadedCallback); | 43 makeXHR(args.method, args.url, args.async, args.user, args.password, args.he
aders || [], args.withCredentials, args.payload, args.type, xhrLoadedCallback); |
| 44 } | 44 } |
| 45 | 45 |
| 46 function makeFetch(url, requestInitializer) | 46 function makeFetch(url, requestInitializer) |
| 47 { | 47 { |
| 48 return fetch(url, requestInitializer).catch(e => e); | 48 return fetch(url, requestInitializer).then(res => { |
| 49 // Call text(). Otherwise the backpressure mechanism may block loading. |
| 50 res.text(); |
| 51 return res; |
| 52 }).catch(e => e); |
| 49 } | 53 } |
| 50 | 54 |
| 51 var initialize_NetworkTest = function() { | 55 var initialize_NetworkTest = function() { |
| 52 | 56 |
| 53 InspectorTest.preloadPanel("network"); | 57 InspectorTest.preloadPanel("network"); |
| 54 | 58 |
| 55 InspectorTest.recordNetwork = function() | 59 InspectorTest.recordNetwork = function() |
| 56 { | 60 { |
| 57 UI.panels.network._networkLogView.setRecording(true); | 61 UI.panels.network._networkLogView.setRecording(true); |
| 58 } | 62 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 version: "formatAsTypeName", | 140 version: "formatAsTypeName", |
| 137 wait: "formatAsTypeName", | 141 wait: "formatAsTypeName", |
| 138 _transferSize: "formatAsTypeName", | 142 _transferSize: "formatAsTypeName", |
| 139 _error: "skip" | 143 _error: "skip" |
| 140 }; | 144 }; |
| 141 // addObject checks own properties only, so make a deep copy rather than use pro
totype. | 145 // addObject checks own properties only, so make a deep copy rather than use pro
totype. |
| 142 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto
rTest.HARPropertyFormatters)); | 146 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto
rTest.HARPropertyFormatters)); |
| 143 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; | 147 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; |
| 144 | 148 |
| 145 }; | 149 }; |
| OLD | NEW |