| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 InspectorTest.addConsoleSniffer(innerCallback); | 118 InspectorTest.addConsoleSniffer(innerCallback); |
| 119 InspectorTest.evaluateInPage("makeXHRForJSONArguments(\"" + jsonArgs + "\")"
); | 119 InspectorTest.evaluateInPage("makeXHRForJSONArguments(\"" + jsonArgs + "\")"
); |
| 120 } | 120 } |
| 121 | 121 |
| 122 InspectorTest.makeFetch = function(url, requestInitializer, callback) | 122 InspectorTest.makeFetch = function(url, requestInitializer, callback) |
| 123 { | 123 { |
| 124 InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer]
).then(callback); | 124 InspectorTest.callFunctionInPageAsync("makeFetch", [url, requestInitializer]
).then(callback); |
| 125 } | 125 } |
| 126 | 126 |
| 127 InspectorTest.clearNetworkCache = function(finishedCallback) |
| 128 { |
| 129 // This turns cache off and then on, effectively clearning the cache. |
| 130 var networkAgent = InspectorTest.NetworkAgent; |
| 131 networkAgent.setCacheDisabled(true, networkAgent.setCacheDisabled.bind( |
| 132 networkAgent, false, finishedCallback)); |
| 133 } |
| 134 |
| 127 InspectorTest.HARPropertyFormatters = { | 135 InspectorTest.HARPropertyFormatters = { |
| 128 bodySize: "formatAsTypeName", | 136 bodySize: "formatAsTypeName", |
| 129 compression: "formatAsTypeName", | 137 compression: "formatAsTypeName", |
| 130 connection: "formatAsTypeName", | 138 connection: "formatAsTypeName", |
| 131 headers: "formatAsTypeName", | 139 headers: "formatAsTypeName", |
| 132 headersSize: "formatAsTypeName", | 140 headersSize: "formatAsTypeName", |
| 133 id: "formatAsTypeName", | 141 id: "formatAsTypeName", |
| 134 onContentLoad: "formatAsTypeName", | 142 onContentLoad: "formatAsTypeName", |
| 135 onLoad: "formatAsTypeName", | 143 onLoad: "formatAsTypeName", |
| 136 receive: "formatAsTypeName", | 144 receive: "formatAsTypeName", |
| 137 startedDateTime: "formatAsRecentTime", | 145 startedDateTime: "formatAsRecentTime", |
| 138 time: "formatAsTypeName", | 146 time: "formatAsTypeName", |
| 139 timings: "formatAsTypeName", | 147 timings: "formatAsTypeName", |
| 140 version: "formatAsTypeName", | 148 version: "formatAsTypeName", |
| 141 wait: "formatAsTypeName", | 149 wait: "formatAsTypeName", |
| 142 _transferSize: "formatAsTypeName", | 150 _transferSize: "formatAsTypeName", |
| 143 _error: "skip" | 151 _error: "skip" |
| 144 }; | 152 }; |
| 145 // addObject checks own properties only, so make a deep copy rather than use pro
totype. | 153 // addObject checks own properties only, so make a deep copy rather than use pro
totype. |
| 146 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto
rTest.HARPropertyFormatters)); | 154 InspectorTest.HARPropertyFormattersWithSize = JSON.parse(JSON.stringify(Inspecto
rTest.HARPropertyFormatters)); |
| 147 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; | 155 InspectorTest.HARPropertyFormattersWithSize.size = "formatAsTypeName"; |
| 148 | 156 |
| 149 }; | 157 }; |
| OLD | NEW |