haikuwebkit/LayoutTests/mhtml/page_with_css_and_js_unmht-...

32 lines
825 B
HTML
Raw Permalink Normal View History

2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. https://bugs.webkit.org/show_bug.cgi?id=7168 * configure.ac: 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support to WebCore. https://bugs.webkit.org/show_bug.cgi?id=7168 * mhtml/frame_0.html_original: Added. * mhtml/frame_1.html_original: Added. * mhtml/frame_2.html_original: Added. * mhtml/frame_4.html_original: Added. * mhtml/multi_frames.html_original: Added. * mhtml/multi_frames_ie.mht: Added. * mhtml/multi_frames_unmht.mht: Added. * mhtml/page_with_css_and_js.html_original: Added. * mhtml/page_with_css_and_js_ie.mht: Added. * mhtml/page_with_css_and_js_unmht.mht: Added. * mhtml/page_with_image.html_original: Added. * mhtml/page_with_image_ie.mht: Added. * mhtml/page_with_image_unmht.mht: Added. * mhtml/resources/red_square.png: Added. * mhtml/simple_page.html_original: Added. * mhtml/simple_page_ie.mht: Added. * mhtml/simple_page_unmht.mht: Added. * platform/chromium/mhtml/multi_frames_ie-expected.txt: Added. * platform/chromium/mhtml/multi_frames_unmht-expected.txt: Added. * platform/chromium/mhtml/page_with_css_and_js_ie-expected.txt: Added. * platform/chromium/mhtml/page_with_css_and_js_unmht-expected.txt: Added. * platform/chromium/mhtml/page_with_image_ie-expected.txt: Added. * platform/chromium/mhtml/page_with_image_unmht-expected.txt: Added. * platform/chromium/mhtml/simple_page_ie-expected.txt: Added. * platform/chromium/mhtml/simple_page_unmht-expected.txt: Added. 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. That required some basic MIME header parsing. Modified DocumentLoader to keep a reference to the currently Archive loaded, so we can have different policies for loading subresources depending on the archive type. https://bugs.webkit.org/show_bug.cgi?id=7168 * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * features.pri: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitLoad): (WebCore::DocumentLoader::setupForReplaceByMIMEType): (WebCore::DocumentLoader::popArchiveForSubframe): (WebCore::DocumentLoader::scheduleArchiveLoad): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::loadArchive): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::finishedLoadingDocument): * loader/FrameLoader.h: (WebCore::FrameLoader::archive): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::start): * loader/archive/Archive.cpp: Added. * loader/archive/Archive.h: (WebCore::Archive::mainResource): * loader/archive/ArchiveFactory.cpp: (WebCore::archiveFactoryCreate): (WebCore::archiveMIMETypes): (WebCore::ArchiveFactory::create): (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes): * loader/archive/ArchiveFactory.h: * loader/archive/ArchiveResourceCollection.cpp: (WebCore::ArchiveResourceCollection::addAllResources): (WebCore::ArchiveResourceCollection::popSubframeArchive): * loader/archive/ArchiveResourceCollection.h: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): (WebCore::LegacyWebArchive::type): * loader/archive/cf/LegacyWebArchive.h: * loader/archive/mhtml/MHTMLArchive.cpp: Added. * loader/archive/mhtml/MHTMLArchive.h: Added. * loader/archive/mhtml/MHTMLParser.cpp: Added. * loader/archive/mhtml/MHTMLParser.h: Added. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedNonImageMimeTypes): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::documentFragment): * platform/network/MIMEHeader.cpp: Added. * platform/network/MIMEHeader.h: Added. 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support to WebCore. https://bugs.webkit.org/show_bug.cgi?id=7168 * features.gypi: 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. https://bugs.webkit.org/show_bug.cgi?id=7168 * Scripts/build-webkit: * Scripts/old-run-webkit-tests: * Scripts/webkitperl/features.pm: * Scripts/webkitpy/layout_tests/port/test_files.py: * Scripts/webkitpy/layout_tests/port/webkit.py: Canonical link: https://commits.webkit.org/76767@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-24 19:32:03 +00:00
<html>
<head>
<link href="resources/hide_image.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="resources/remove_image_script.js"></script>
Convert current MHTML tests into reftests https://bugs.webkit.org/show_bug.cgi?id=116443 Reviewed by Andreas Kling. Convert the current set of MHTML tests into reference tests. Reference files are copied from the *_original files where available (with the *_original files removed) or from the source markup and code that's stored in the archive. Both the archives and the reference files are adjusted to now dump pixel output instead of text. * mhtml/check_domain-expected.html: Added. * mhtml/check_domain-expected.txt: Removed. * mhtml/check_domain.mht: * mhtml/frame_4.html_original: Removed. * mhtml/multi_frames.html_original: Removed. * mhtml/multi_frames_binary-expected.html: Added. * mhtml/multi_frames_binary-expected.txt: Removed. * mhtml/multi_frames_binary.mht: * mhtml/multi_frames_ie-expected.html: Added. * mhtml/multi_frames_ie-expected.txt: Removed. * mhtml/multi_frames_ie.mht: * mhtml/multi_frames_unmht-expected.html: Added. * mhtml/multi_frames_unmht-expected.txt: Removed. * mhtml/multi_frames_unmht.mht: * mhtml/page_with_css_and_js_ie-expected.html: Copied from LayoutTests/mhtml/page_with_css_and_js.html_original. * mhtml/page_with_css_and_js_ie-expected.txt: Removed. * mhtml/page_with_css_and_js_ie.mht: * mhtml/page_with_css_and_js_unmht-expected.html: Renamed from LayoutTests/mhtml/page_with_css_and_js.html_original. * mhtml/page_with_css_and_js_unmht-expected.txt: Removed. * mhtml/page_with_css_and_js_unmht.mht: * mhtml/page_with_image.html_original: Removed. * mhtml/page_with_image_ie-expected.html: Added. * mhtml/page_with_image_ie-expected.txt: Removed. * mhtml/page_with_image_ie.mht: * mhtml/page_with_image_unmht-expected.html: Added. * mhtml/page_with_image_unmht-expected.txt: Removed. * mhtml/page_with_image_unmht.mht: * mhtml/resources/frame_0.html: Renamed from LayoutTests/mhtml/frame_0.html_original. * mhtml/resources/frame_1.html: Renamed from LayoutTests/mhtml/frame_1.html_original. * mhtml/resources/frame_2.html: Renamed from LayoutTests/mhtml/frame_2.html_original. * mhtml/resources/frame_4.html: Added. * mhtml/resources/hide_image.css: Added. (#secondDiv): * mhtml/resources/remove_image_script.js: Added. (onLoad): * mhtml/resources/style.css: Copied from LayoutTests/mhtml/shared_buffer_bug.mht. (h1): * mhtml/shared_buffer_bug-expected.html: Added. * mhtml/shared_buffer_bug-expected.txt: Removed. * mhtml/shared_buffer_bug.mht: * mhtml/simple_page_ie-expected.html: Copied from LayoutTests/mhtml/simple_page.html_original. * mhtml/simple_page_ie-expected.txt: Removed. * mhtml/simple_page_ie.mht: * mhtml/simple_page_unmht-expected.html: Renamed from LayoutTests/mhtml/simple_page.html_original. * mhtml/simple_page_unmht-expected.txt: Removed. * mhtml/simple_page_unmht.mht: Canonical link: https://commits.webkit.org/146481@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-02-08 17:08:08 +00:00
<script>
if (window.testRunner)
testRunner.waitUntilDone();
</script>
2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. https://bugs.webkit.org/show_bug.cgi?id=7168 * configure.ac: 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support to WebCore. https://bugs.webkit.org/show_bug.cgi?id=7168 * mhtml/frame_0.html_original: Added. * mhtml/frame_1.html_original: Added. * mhtml/frame_2.html_original: Added. * mhtml/frame_4.html_original: Added. * mhtml/multi_frames.html_original: Added. * mhtml/multi_frames_ie.mht: Added. * mhtml/multi_frames_unmht.mht: Added. * mhtml/page_with_css_and_js.html_original: Added. * mhtml/page_with_css_and_js_ie.mht: Added. * mhtml/page_with_css_and_js_unmht.mht: Added. * mhtml/page_with_image.html_original: Added. * mhtml/page_with_image_ie.mht: Added. * mhtml/page_with_image_unmht.mht: Added. * mhtml/resources/red_square.png: Added. * mhtml/simple_page.html_original: Added. * mhtml/simple_page_ie.mht: Added. * mhtml/simple_page_unmht.mht: Added. * platform/chromium/mhtml/multi_frames_ie-expected.txt: Added. * platform/chromium/mhtml/multi_frames_unmht-expected.txt: Added. * platform/chromium/mhtml/page_with_css_and_js_ie-expected.txt: Added. * platform/chromium/mhtml/page_with_css_and_js_unmht-expected.txt: Added. * platform/chromium/mhtml/page_with_image_ie-expected.txt: Added. * platform/chromium/mhtml/page_with_image_unmht-expected.txt: Added. * platform/chromium/mhtml/simple_page_ie-expected.txt: Added. * platform/chromium/mhtml/simple_page_unmht-expected.txt: Added. 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. That required some basic MIME header parsing. Modified DocumentLoader to keep a reference to the currently Archive loaded, so we can have different policies for loading subresources depending on the archive type. https://bugs.webkit.org/show_bug.cgi?id=7168 * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * features.pri: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitLoad): (WebCore::DocumentLoader::setupForReplaceByMIMEType): (WebCore::DocumentLoader::popArchiveForSubframe): (WebCore::DocumentLoader::scheduleArchiveLoad): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::loadArchive): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::finishedLoadingDocument): * loader/FrameLoader.h: (WebCore::FrameLoader::archive): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::start): * loader/archive/Archive.cpp: Added. * loader/archive/Archive.h: (WebCore::Archive::mainResource): * loader/archive/ArchiveFactory.cpp: (WebCore::archiveFactoryCreate): (WebCore::archiveMIMETypes): (WebCore::ArchiveFactory::create): (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes): * loader/archive/ArchiveFactory.h: * loader/archive/ArchiveResourceCollection.cpp: (WebCore::ArchiveResourceCollection::addAllResources): (WebCore::ArchiveResourceCollection::popSubframeArchive): * loader/archive/ArchiveResourceCollection.h: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): (WebCore::LegacyWebArchive::type): * loader/archive/cf/LegacyWebArchive.h: * loader/archive/mhtml/MHTMLArchive.cpp: Added. * loader/archive/mhtml/MHTMLArchive.h: Added. * loader/archive/mhtml/MHTMLParser.cpp: Added. * loader/archive/mhtml/MHTMLParser.h: Added. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedNonImageMimeTypes): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::documentFragment): * platform/network/MIMEHeader.cpp: Added. * platform/network/MIMEHeader.h: Added. 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support to WebCore. https://bugs.webkit.org/show_bug.cgi?id=7168 * features.gypi: 2011-05-24 Jay Civelli <jcivelli@chromium.org> Reviewed by Adam Barth. Adding MHTML reading support. https://bugs.webkit.org/show_bug.cgi?id=7168 * Scripts/build-webkit: * Scripts/old-run-webkit-tests: * Scripts/webkitperl/features.pm: * Scripts/webkitpy/layout_tests/port/test_files.py: * Scripts/webkitpy/layout_tests/port/webkit.py: Canonical link: https://commits.webkit.org/76767@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-05-24 19:32:03 +00:00
</head>
<body onload="onLoad()">
This page tests that CSS and JavaScript resources are retrieved correctly for MHTML files.<br><br>
There should be only one red square below:
<div id="firstDiv">
<img src="resources/red_square.png"><br><br>
</div>
<div id="secondDiv">
The red square below should be hidden by way of CSS.<br>
<img src="resources/red_square.png"><br><br>
</div>
<div id="thirdDiv">
The red square below should be hidden by way of JavaScript.<br>
<img src="resources/red_square.png"><br><br>
</div>
</body>
</html>