Changeset 58318 in webkit
- Timestamp:
- Apr 27, 2010 11:47:44 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r58313 r58318 1 2010-04-27 Andrey Kosyakov <caseq@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Log error message to inspector console if a resource fails to load. 6 Moved console-tests.js to http tests. Added support for sorting 7 console messages, in case order may vary. 8 https://bugs.webkit.org/show_bug.cgi?id=37215 9 10 * http/tests/inspector/console-resource-errors-expected.txt: Added. 11 * http/tests/inspector/console-resource-errors.html: Added. 12 * http/tests/inspector/console-tests.js: Added. 13 (dumpConsoleMessages.callback): 14 (dumpConsoleMessages): 15 (dumpConsoleMessagesWithClasses.callback): 16 (dumpConsoleMessagesWithClasses): 17 (frontend_dumpConsoleMessages): 18 * inspector/console-clear.html: 19 * inspector/console-dir.html: 20 * inspector/console-dirxml.html: 21 * inspector/console-format-collections-expected.txt: 22 * inspector/console-format-collections.html: 23 * inspector/console-format.html: 24 * inspector/console-log-before-inspector-open.html: 25 * inspector/console-tests.html: 26 * inspector/console-tests.js: Removed. 27 1 28 2010-04-27 Joseph Pecoraro <joepeck@webkit.org> 2 29 -
trunk/LayoutTests/http/tests/inspector/console-tests.js
- Property svn:executable deleted
r58317 r58318 12 12 } 13 13 14 function dumpConsoleMessagesWithClasses( ) {14 function dumpConsoleMessagesWithClasses(sortMessages) { 15 15 function callback(result) 16 16 { 17 var messages = []; 17 18 for (var i = 0; i < result.length; ++i) 18 output(result[i].text + " " + result[i].clazz); 19 messages.push(result[i].text + " " + result[i].clazz); 20 if (sortMessages) 21 messages.sort(); 22 for (var i = 0; i < messages.length; ++i) 23 output(messages[i]); 19 24 notifyDone(); 20 25 } -
trunk/LayoutTests/inspector/console-clear.html
r54659 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-dir.html
r54769 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-dirxml.html
r54659 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-format-collections-expected.txt
r57405 r58318 9 9 10 10 console-format-collections.html:15[<select id="sel" name="sel">…</select>] 11 console-format-collections.html:19[<script src="../http/tests/inspector/inspector-test.js"></script>, <script src=" console-tests.js"></script>, <script>…</script>]11 console-format-collections.html:19[<script src="../http/tests/inspector/inspector-test.js"></script>, <script src="../http/tests/inspector/console-tests.js"></script>, <script>…</script>] 12 12 console-format-collections.html:23[<option value="1">one</option>, <option value="2">two</option>] 13 console-format-collections.html:27[<html>…</html>, <head>…</head>, <script src="../http/tests/inspector/inspector-test.js"></script>, <script src=" console-tests.js"></script>, <script>…</script>, <body onload="onload()">…</body>, <p> Tests that console nicely formats HTML Collections and NodeLists. </p>, <div style="display:none">…</div>, <form id="f">…</form>, <select id="sel" name="sel">…</select>, <option value="1">one</option>, <option value="2">two</option>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">, <div id="output"></div>]13 console-format-collections.html:27[<html>…</html>, <head>…</head>, <script src="../http/tests/inspector/inspector-test.js"></script>, <script src="../http/tests/inspector/console-tests.js"></script>, <script>…</script>, <body onload="onload()">…</body>, <p> Tests that console nicely formats HTML Collections and NodeLists. </p>, <div style="display:none">…</div>, <form id="f">…</form>, <select id="sel" name="sel">…</select>, <option value="1">one</option>, <option value="2">two</option>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">, <div id="output"></div>] 14 14 console-format-collections.html:31[<select id="sel" name="sel">…</select>, <input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] 15 15 console-format-collections.html:35[<input type="radio" name="x" value="x1">, <input type="radio" name="x" value="x2">] -
trunk/LayoutTests/inspector/console-format-collections.html
r57405 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-format.html
r54659 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-log-before-inspector-open.html
r54659 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/LayoutTests/inspector/console-tests.html
r54659 r58318 2 2 <head> 3 3 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src=" console-tests.js"></script>4 <script src="../http/tests/inspector/console-tests.js"></script> 5 5 <script> 6 6 -
trunk/WebCore/ChangeLog
r58316 r58318 1 2010-04-27 Andrey Kosyakov <caseq@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Log error message to inspector console if a resource fails to load. 6 Disable checking of mime-type consistency for failed resources. 7 https://bugs.webkit.org/show_bug.cgi?id=37215 8 9 Test: http/tests/inspector/console-resource-errors.html 10 11 * inspector/InspectorController.cpp: 12 (WebCore::InspectorController::didReceiveResponse): 13 (WebCore::InspectorController::didFailLoading): 14 * inspector/front-end/Resource.js: 15 (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType): 16 * inspector/front-end/ResourcesPanel.js: 17 (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): 18 1 19 2010-04-27 Vitaly Repeshko <vitalyr@chromium.org> 2 20 -
trunk/WebCore/inspector/InspectorController.cpp
r58162 r58318 895 895 void InspectorController::didReceiveResponse(unsigned long identifier, const ResourceResponse& response) 896 896 { 897 RefPtr<InspectorResource> resource = getTrackedResource(identifier); 898 if (!resource) 899 return; 900 901 resource->updateResponse(response); 902 resource->markResponseReceivedTime(); 903 904 if (resource != m_mainResource && m_frontend) 905 resource->updateScriptObject(m_frontend.get()); 897 if (RefPtr<InspectorResource> resource = getTrackedResource(identifier)) { 898 resource->updateResponse(response); 899 resource->markResponseReceivedTime(); 900 901 if (resource != m_mainResource && m_frontend) 902 resource->updateScriptObject(m_frontend.get()); 903 } 904 if (response.httpStatusCode() >= 400) { 905 // The ugly code below is due to that String::format() is not utf8-safe at the moment. 906 String message = String::format("Failed to load resource: the server responded with a status of %u (", response.httpStatusCode()) + response.httpStatusText() + ")"; 907 908 addMessageToConsole(OtherMessageSource, LogMessageType, ErrorMessageLevel, message, 0, response.url().string()); 909 } 906 910 } 907 911 … … 934 938 } 935 939 936 void InspectorController::didFailLoading(unsigned long identifier, const ResourceError& /*error*/)940 void InspectorController::didFailLoading(unsigned long identifier, const ResourceError& error) 937 941 { 938 942 if (m_timelineAgent) 939 943 m_timelineAgent->didFinishLoadingResource(identifier, true); 944 945 String message = "Failed to load resource"; 946 if (!error.localizedDescription().isEmpty()) 947 message += ": " + error.localizedDescription(); 948 addMessageToConsole(OtherMessageSource, LogMessageType, ErrorMessageLevel, message, 0, error.failingURL()); 940 949 941 950 RefPtr<InspectorResource> resource = getTrackedResource(identifier); -
trunk/WebCore/inspector/front-end/Resource.js
r57616 r58318 537 537 _mimeTypeIsConsistentWithType: function() 538 538 { 539 // If status is an error, content is likely to be of an inconsistent type, 540 // as it's going to be an error message. We do not want to emit a warning 541 // for this, though, as this will already be reported as resource loading failure. 542 if (this.statusCode >= 400) 543 return true; 544 539 545 if (typeof this.type === "undefined" 540 546 || this.type === WebInspector.Resource.Type.Other -
trunk/WebCore/inspector/front-end/ResourcesPanel.js
r57616 r58318 444 444 return; 445 445 446 resource.warnings = 0;447 resource.errors = 0;448 449 446 if (!this.currentQuery && resource._itemsTreeElement) 450 447 resource._itemsTreeElement.updateErrorsAndWarnings();
Note: See TracChangeset
for help on using the changeset viewer.