OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 // as it's going to be an error message. We do not want to emit a warnin g | 259 // as it's going to be an error message. We do not want to emit a warnin g |
260 // for this, though, as this will already be reported as resource loadin g failure. | 260 // for this, though, as this will already be reported as resource loadin g failure. |
261 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en produces text/css and gets reloaded, | 261 // Also, if a URL like http://localhost/wiki/load.php?debug=true&lang=en produces text/css and gets reloaded, |
262 // it is 304 Not Modified and its guessed mime-type is text/php, which i s wrong. | 262 // it is 304 Not Modified and its guessed mime-type is text/php, which i s wrong. |
263 // Don't check for mime-types in 304-resources. | 263 // Don't check for mime-types in 304-resources. |
264 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode === 304 || networkRequest.statusCode === 204) | 264 if (networkRequest.hasErrorStatusCode() || networkRequest.statusCode === 304 || networkRequest.statusCode === 204) |
265 return true; | 265 return true; |
266 | 266 |
267 var resourceType = networkRequest.resourceType(); | 267 var resourceType = networkRequest.resourceType(); |
268 if (resourceType === undefined | 268 if (resourceType === undefined |
269 || resourceType === WebInspector.resourceTypes.Image | |
eustas
2015/02/24 05:59:21
If we exclude all those types only three remain. S
| |
269 || resourceType === WebInspector.resourceTypes.Other | 270 || resourceType === WebInspector.resourceTypes.Other |
270 || resourceType === WebInspector.resourceTypes.Media | 271 || resourceType === WebInspector.resourceTypes.Media |
272 || resourceType === WebInspector.resourceTypes.Script | |
273 || resourceType === WebInspector.resourceTypes.Stylesheet | |
271 || resourceType === WebInspector.resourceTypes.XHR | 274 || resourceType === WebInspector.resourceTypes.XHR |
272 || resourceType === WebInspector.resourceTypes.WebSocket) | 275 || resourceType === WebInspector.resourceTypes.WebSocket) |
273 return true; | 276 return true; |
274 | 277 |
275 if (!networkRequest.mimeType) | 278 if (!networkRequest.mimeType) |
276 return true; // Might be not known for cached resources with null re sponses. | 279 return true; // Might be not known for cached resources with null re sponses. |
277 | 280 |
278 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) | 281 if (networkRequest.mimeType in WebInspector.NetworkManager._MIMETypes) |
279 return resourceType.name() in WebInspector.NetworkManager._MIMETypes [networkRequest.mimeType]; | 282 return resourceType.name() in WebInspector.NetworkManager._MIMETypes [networkRequest.mimeType]; |
280 | 283 |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
700 target.networkAgent().emulateNetworkConditions(this._networkConditio ns.offline, this._networkConditions.latency, | 703 target.networkAgent().emulateNetworkConditions(this._networkConditio ns.offline, this._networkConditions.latency, |
701 this._networkConditions.throughput, this._networkConditions.thro ughput); | 704 this._networkConditions.throughput, this._networkConditions.thro ughput); |
702 } | 705 } |
703 } | 706 } |
704 } | 707 } |
705 | 708 |
706 /** | 709 /** |
707 * @type {!WebInspector.MultitargetNetworkManager} | 710 * @type {!WebInspector.MultitargetNetworkManager} |
708 */ | 711 */ |
709 WebInspector.multitargetNetworkManager; | 712 WebInspector.multitargetNetworkManager; |
OLD | NEW |