Changeset 86417 in webkit
- Timestamp:
- May 13, 2011 12:20:02 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86413 r86417 1 2011-05-13 Alexey Proskuryakov <ap@apple.com> 2 3 Unreviewed test changes. 4 5 Web Inspector: Show Error Messages for Application Cache Errors 6 https://bugs.webkit.org/show_bug.cgi?id=41642 7 8 * http/tests/appcache/404-resource-expected.txt: 9 * http/tests/appcache/manifest-redirect-expected.txt: 10 * http/tests/appcache/origin-quota-expected.txt: 11 * http/tests/appcache/resource-redirect-2-expected.txt: 12 * http/tests/appcache/resource-redirect-expected.txt: 13 * http/tests/appcache/wrong-content-type-expected.txt: 14 * http/tests/appcache/wrong-signature-2-expected.txt: 15 * http/tests/appcache/wrong-signature-expected.txt: 16 1 17 2011-05-12 Ben Wells <benwells@chromium.org> 2 18 -
trunk/LayoutTests/http/tests/appcache/404-resource-expected.txt
r40164 r86417 1 CONSOLE MESSAGE: line 0: Application Cache update failed, because http://127.0.0.1:8000/appcache/resources/does-not-exist.txt could not be fetched. 1 2 Test that a missing explicit resource makes caching fail. 2 3 -
trunk/LayoutTests/http/tests/appcache/manifest-redirect-expected.txt
r40356 r86417 1 CONSOLE MESSAGE: line 0: Application Cache manifest could not be fetched, because a redirection was attempted. 1 2 Test that a redirect makes resource caching fail. 2 3 -
trunk/LayoutTests/http/tests/appcache/origin-quota-expected.txt
r64613 r86417 1 1 UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{http, 127.0.0.1, 8000} 2 CONSOLE MESSAGE: line 0: Application Cache update failed, because size quota was exceeded. 2 3 This test checks that per-origin application cache quotas are enforced. 3 4 -
trunk/LayoutTests/http/tests/appcache/resource-redirect-2-expected.txt
r40368 r86417 1 CONSOLE MESSAGE: line 0: Application Cache update failed, because http://127.0.0.1:8000/appcache/resources/resource-redirect-2.php could not be fetched. 1 2 Test that a redirect makes resource caching fail. 2 3 -
trunk/LayoutTests/http/tests/appcache/resource-redirect-expected.txt
r40356 r86417 1 CONSOLE MESSAGE: line 0: Application Cache update failed, because http://127.0.0.1:8000/appcache/resources/resource-redirect.php was redirected. 1 2 Test that a redirect makes resource caching fail. 2 3 -
trunk/LayoutTests/http/tests/appcache/wrong-content-type-expected.txt
r39550 r86417 1 CONSOLE MESSAGE: line 0: Application Cache manifest had an incorrect MIME type: text/plain. 1 2 Test that a manifest served with a wrong content-type isn't treated as such. 2 3 -
trunk/LayoutTests/http/tests/appcache/wrong-signature-2-expected.txt
r40355 r86417 1 CONSOLE MESSAGE: line 0: Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST? 1 2 Test that a manifest served with a wrong signature isn't treated as such. 2 3 -
trunk/LayoutTests/http/tests/appcache/wrong-signature-expected.txt
r39550 r86417 1 CONSOLE MESSAGE: line 0: Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST? 1 2 Test that a manifest served with a wrong signature isn't treated as such. 2 3 -
trunk/Source/WebCore/ChangeLog
r86416 r86417 1 2011-05-13 Alexey Proskuryakov <ap@apple.com> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Show Error Messages for Application Cache Errors 6 https://bugs.webkit.org/show_bug.cgi?id=41642 7 8 * loader/appcache/ApplicationCacheGroup.cpp: 9 (WebCore::ApplicationCacheGroup::didReceiveResponse): 10 (WebCore::ApplicationCacheGroup::didFail): 11 (WebCore::ApplicationCacheGroup::didReceiveManifestResponse): 12 (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): 13 (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota): 14 Added console error logging. 15 1 16 2011-05-12 Pratik Solanki <psolanki@apple.com> 2 17 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
r86251 r86417 35 35 #include "Chrome.h" 36 36 #include "ChromeClient.h" 37 #include "Console.h" 37 38 #include "DOMApplicationCache.h" 38 39 #include "DOMWindow.h" … … 526 527 if (response.httpStatusCode() / 100 != 2 || response.url() != m_currentHandle->firstRequest().url()) { 527 528 if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) { 529 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because " + m_currentHandle->firstRequest().url().string() + 530 ((response.httpStatusCode() / 100 != 2) ? " could not be fetched." : " was redirected."), 0, String()); 528 531 // Note that cacheUpdateFailed() can cause the cache group to be deleted. 529 532 cacheUpdateFailed(); … … 623 626 624 627 if (handle == m_manifestHandle) { 628 // A network error is logged elsewhere, no need to log again. Also, it's normal for manifest fetching to fail when working offline. 625 629 cacheUpdateFailed(); 626 630 return; … … 637 641 638 642 if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) { 643 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because " + url.string() + " could not be fetched.", 0, String()); 639 644 // Note that cacheUpdateFailed() can cause the cache group to be deleted. 640 645 cacheUpdateFailed(); … … 664 669 return; 665 670 666 if (response.httpStatusCode() / 100 != 2 || response.url() != m_manifestHandle->firstRequest().url() || !equalIgnoringCase(response.mimeType(), "text/cache-manifest")) { 671 if (response.httpStatusCode() / 100 != 2) { 672 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache manifest could not be fetched.", 0, String()); 673 cacheUpdateFailed(); 674 return; 675 } 676 677 if (response.url() != m_manifestHandle->firstRequest().url()) { 678 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache manifest could not be fetched, because a redirection was attempted.", 0, String()); 679 cacheUpdateFailed(); 680 return; 681 } 682 683 if (!equalIgnoringCase(response.mimeType(), "text/cache-manifest")) { 684 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache manifest had an incorrect MIME type: " + response.mimeType() + ".", 0, String()); 667 685 cacheUpdateFailed(); 668 686 return; … … 684 702 if (!isUpgradeAttempt && !m_manifestResource) { 685 703 // The server returned 304 Not Modified even though we didn't send a conditional request. 704 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache manifest could not be fetched because of an unexpected 304 Not Modified server response.", 0, String()); 686 705 cacheUpdateFailed(); 687 706 return; … … 708 727 Manifest manifest; 709 728 if (!parseManifest(m_manifestURL, m_manifestResource->data()->data(), m_manifestResource->data()->size(), manifest)) { 729 // At the time of this writing, lack of "CACHE MANIFEST" signature is the only reason for parseManifest to fail. 730 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache manifest could not be parsed. Does it start with CACHE MANIFEST?", 0, String()); 710 731 cacheUpdateFailed(); 711 732 return; … … 787 808 } 788 809 810 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.", 0, String()); 811 812 // FIXME: Should not abort cache update - the user may choose to increase the quota. 789 813 cacheUpdateFailed(); 790 814 }
Note: See TracChangeset
for help on using the changeset viewer.