Bug 22466: REGRESSION (35867): Many resources missing when saving webarchive of webkit.org
<https://bugs.webkit.org/show_bug.cgi?id=22466>
<rdar://problem/6403593>
Reviewed by Brady Eidson.
WebCore:
Test: http/tests/webarchive/test-preload-resources.html
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Check the WebCore cache for
resources if DocumentLoader::subresource() doesn't return them.
Note that the DocumentLoader::subresource() method returned
preloaded resources before r35867, but this caused a regression in
Mail.
WebKitTools:
* DumpRenderTree/mac/DumpRenderTree.mm:
(normalizeHTTPResponseHeaderFields): Added. Normalizes Date, Etag,
Keep-Alive, Last-Modified and Server header fields to prevent false
positive test failures.
(convertWebResourceResponseToDictionary): Call
normalizeHTTPResponseHeaderFields() to noramlize HTTP response
header fields.
LayoutTests:
* http/tests/webarchive/resources/test-preload-resources.css: Added.
* http/tests/webarchive/test-preload-resources-expected.webarchive: Added.
* http/tests/webarchive/test-preload-resources.html: Added.
* platform/qt/Skipped: Added http/tests/webarchive and grouped the
skipped list of other webarchive tests together.
* platform/win/Skipped: Added http/tests/webarchive.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38884
268f45cc-cd09-0410-ab3c-
d52691b4dbfc