| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 networkRequest.timing = response.timing; | 193 networkRequest.timing = response.timing; |
| 194 | 194 |
| 195 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { | 195 if (!this._mimeTypeIsConsistentWithType(networkRequest)) { |
| 196 this._manager._target.consoleModel.addMessage(new WebInspector.Conso
leMessage(WebInspector.ConsoleMessage.MessageSource.Network, | 196 this._manager._target.consoleModel.addMessage(new WebInspector.Conso
leMessage(WebInspector.ConsoleMessage.MessageSource.Network, |
| 197 WebInspector.ConsoleMessage.MessageLevel.Log, | 197 WebInspector.ConsoleMessage.MessageLevel.Log, |
| 198 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), | 198 WebInspector.UIString("Resource interpreted as %s but transferre
d with MIME type %s: \"%s\".", networkRequest.type.title(), networkRequest.mimeT
ype, networkRequest.url), |
| 199 WebInspector.ConsoleMessage.MessageType.Log, | 199 WebInspector.ConsoleMessage.MessageType.Log, |
| 200 "", | 200 "", |
| 201 0, | 201 0, |
| 202 0, | 202 0, |
| 203 1, | |
| 204 networkRequest.requestId)); | 203 networkRequest.requestId)); |
| 205 } | 204 } |
| 206 }, | 205 }, |
| 207 | 206 |
| 208 /** | 207 /** |
| 209 * @param {!WebInspector.NetworkRequest} networkRequest | 208 * @param {!WebInspector.NetworkRequest} networkRequest |
| 210 * @return {boolean} | 209 * @return {boolean} |
| 211 */ | 210 */ |
| 212 _mimeTypeIsConsistentWithType: function(networkRequest) | 211 _mimeTypeIsConsistentWithType: function(networkRequest) |
| 213 { | 212 { |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc
umentURL, frameId, loaderId); | 564 var networkRequest = new WebInspector.NetworkRequest(requestId, url, doc
umentURL, frameId, loaderId); |
| 566 networkRequest.initiator = initiator; | 565 networkRequest.initiator = initiator; |
| 567 return networkRequest; | 566 return networkRequest; |
| 568 } | 567 } |
| 569 } | 568 } |
| 570 | 569 |
| 571 /** | 570 /** |
| 572 * @type {!WebInspector.NetworkManager} | 571 * @type {!WebInspector.NetworkManager} |
| 573 */ | 572 */ |
| 574 WebInspector.networkManager; | 573 WebInspector.networkManager; |
| OLD | NEW |