LayoutTests:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Dec 2006 04:38:12 +0000 (04:38 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Dec 2006 04:38:12 +0000 (04:38 +0000)
        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=11882
        Need a way to regression test .webarchive output files

        Created webarchive tests that exercise various features of the WebArchive format.

        * webarchive/resources/apple.gif: Copied from fast/canvas/resources/apple.gif.
        * webarchive/resources/dump-webarchive.js: Added.
        * webarchive/resources/test-frame.html: Added.
        * webarchive/resources/test-style.css: Added.
        * webarchive/test-body-background-expected.txt: Added.
        * webarchive/test-body-background.html: Added.
        * webarchive/test-duplicate-resources-expected.txt: Added.
        * webarchive/test-duplicate-resources.html: Added.
        * webarchive/test-frameset-expected.txt: Added.
        * webarchive/test-frameset.html: Added.
        * webarchive/test-img-src-expected.txt: Added.
        * webarchive/test-img-src.html: Added.
        * webarchive/test-input-src-expected.txt: Added.
        * webarchive/test-input-src.html: Added.
        * webarchive/test-link-href-expected.txt: Added.
        * webarchive/test-link-href.html: Added.
        * webarchive/test-object-data-expected.txt: Added.
        * webarchive/test-object-data.html: Added.
        * webarchive/test-script-src-expected.txt: Added.
        * webarchive/test-script-src.html: Added.
        * webarchive/test-table-background-expected.txt: Added.
        * webarchive/test-table-background.html: Added.
        * webarchive/test-td-background-expected.txt: Added.
        * webarchive/test-td-background.html: Added.

WebKitTools:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=11882
        Need a way to regression test .webarchive output files

        Implement layoutTestController.dumpAsWebArchive() to test WebArchive format.
        Saves WebArchive plist in xml format, then alters file:// URLs to remove path
        where WebKit was checked out.

        * DumpRenderTree/DumpRenderTree.m:
        (serializeWebArchiveToXML): Added.
        (dump):
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (-[LayoutTestController dumpAsWebArchive]): Added.
        (runTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18466 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
LayoutTests/ChangeLog
LayoutTests/webarchive/resources/apple.gif [new file with mode: 0644]
LayoutTests/webarchive/resources/dump-webarchive.js [new file with mode: 0644]
LayoutTests/webarchive/resources/test-frame.html [new file with mode: 0644]
LayoutTests/webarchive/resources/test-style.css [new file with mode: 0644]
LayoutTests/webarchive/test-body-background-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-body-background.html [new file with mode: 0644]
LayoutTests/webarchive/test-duplicate-resources-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-duplicate-resources.html [new file with mode: 0644]
LayoutTests/webarchive/test-frameset-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-frameset.html [new file with mode: 0644]
LayoutTests/webarchive/test-img-src-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-img-src.html [new file with mode: 0644]
LayoutTests/webarchive/test-input-src-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-input-src.html [new file with mode: 0644]
LayoutTests/webarchive/test-link-href-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-link-href.html [new file with mode: 0644]
LayoutTests/webarchive/test-object-data-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-object-data.html [new file with mode: 0644]
LayoutTests/webarchive/test-script-src-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-script-src.html [new file with mode: 0644]
LayoutTests/webarchive/test-table-background-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-table-background.html [new file with mode: 0644]
LayoutTests/webarchive/test-td-background-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/test-td-background.html [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m

index a742846..c65f8fa 100644 (file)
@@ -1,3 +1,37 @@
+2006-12-28  David Kilzer  <ddkilzer@webkit.org>
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11882
+        Need a way to regression test .webarchive output files
+
+        Created webarchive tests that exercise various features of the WebArchive format.
+
+        * webarchive/resources/apple.gif: Copied from fast/canvas/resources/apple.gif.
+        * webarchive/resources/dump-webarchive.js: Added.
+        * webarchive/resources/test-frame.html: Added.
+        * webarchive/resources/test-style.css: Added.
+        * webarchive/test-body-background-expected.txt: Added.
+        * webarchive/test-body-background.html: Added.
+        * webarchive/test-duplicate-resources-expected.txt: Added.
+        * webarchive/test-duplicate-resources.html: Added.
+        * webarchive/test-frameset-expected.txt: Added.
+        * webarchive/test-frameset.html: Added.
+        * webarchive/test-img-src-expected.txt: Added.
+        * webarchive/test-img-src.html: Added.
+        * webarchive/test-input-src-expected.txt: Added.
+        * webarchive/test-input-src.html: Added.
+        * webarchive/test-link-href-expected.txt: Added.
+        * webarchive/test-link-href.html: Added.
+        * webarchive/test-object-data-expected.txt: Added.
+        * webarchive/test-object-data.html: Added.
+        * webarchive/test-script-src-expected.txt: Added.
+        * webarchive/test-script-src.html: Added.
+        * webarchive/test-table-background-expected.txt: Added.
+        * webarchive/test-table-background.html: Added.
+        * webarchive/test-td-background-expected.txt: Added.
+        * webarchive/test-td-background.html: Added.
+
 2006-12-28  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/webarchive/resources/apple.gif b/LayoutTests/webarchive/resources/apple.gif
new file mode 100644 (file)
index 0000000..55844c8
Binary files /dev/null and b/LayoutTests/webarchive/resources/apple.gif differ
diff --git a/LayoutTests/webarchive/resources/dump-webarchive.js b/LayoutTests/webarchive/resources/dump-webarchive.js
new file mode 100644 (file)
index 0000000..e7379ce
--- /dev/null
@@ -0,0 +1,2 @@
+if (window.layoutTestController)
+    layoutTestController.dumpAsWebArchive();
diff --git a/LayoutTests/webarchive/resources/test-frame.html b/LayoutTests/webarchive/resources/test-frame.html
new file mode 100644 (file)
index 0000000..3d8b660
--- /dev/null
@@ -0,0 +1,16 @@
+<html>
+<head>
+<link rel="stylesheet" href="test-style.css" type="text/css">
+</head>
+<body>
+<div>
+  <img src="apple.gif">
+</div>
+<div>
+  This is a subframe.  This text should be red sans-serif.
+</div>
+<div>
+  <img src="apple.gif">
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/resources/test-style.css b/LayoutTests/webarchive/resources/test-style.css
new file mode 100644 (file)
index 0000000..6a5dab8
--- /dev/null
@@ -0,0 +1 @@
+div { font-family: Arial, Helvetica, sans-serif; color: red; }
diff --git a/LayoutTests/webarchive/test-body-background-expected.txt b/LayoutTests/webarchive/test-body-background-expected.txt
new file mode 100644 (file)
index 0000000..5314639
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keSBiYWNr
+               Z3JvdW5kPSJyZXNvdXJjZXMvYXBwbGUuZ2lmIj4KCgo8L2JvZHk+PC9odG1s
+               Pg==
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-body-background.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-body-background.html b/LayoutTests/webarchive/test-body-background.html
new file mode 100644 (file)
index 0000000..1307275
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body background="resources/apple.gif">
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-duplicate-resources-expected.txt b/LayoutTests/webarchive/test-duplicate-resources-expected.txt
new file mode 100644 (file)
index 0000000..8f25d04
--- /dev/null
@@ -0,0 +1,509 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQgc3JjPSJyZXNvdXJjZXMvZHVtcC13ZWJh
+               cmNoaXZlLmpzIiBsYW5ndWFnZT0iamF2YXNjcmlwdCIgdHlwZT0idGV4dC9q
+               YXZhc2NyaXB0Ij48L3NjcmlwdD4KPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBo
+               cmVmPSJyZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3MiIHR5cGU9InRleHQvY3Nz
+               Ij4KPHNjcmlwdCBzcmM9InJlc291cmNlcy9kdW1wLXdlYmFyY2hpdmUuanMi
+               IGxhbmd1YWdlPSJqYXZhc2NyaXB0IiB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQi
+               Pjwvc2NyaXB0Pgo8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9InJlc291
+               cmNlcy90ZXN0LXN0eWxlLmNzcyIgdHlwZT0idGV4dC9jc3MiPgo8L2hlYWQ+
+               PGJvZHk+CjxkaXY+CiAgPGltZyBzcmM9InJlc291cmNlcy9hcHBsZS5naWYi
+               Pgo8L2Rpdj4KPGRpdj4KICBUaGlzIGlzIG5vdCBhIGZyYW1lc2V0LiAgVGhp
+               cyB0ZXh0IHNob3VsZCBiZSByZWQgc2Fucy1zZXJpZi4KPC9kaXY+CjxkaXY+
+               CiAgPGltZyBzcmM9InJlc291cmNlcy9hcHBsZS5naWYiPgo8L2Rpdj4KPGlm
+               cmFtZSBzcmM9InJlc291cmNlcy90ZXN0LWZyYW1lLmh0bWwiPjwvaWZyYW1l
+               PgoKCjwvYm9keT48L2h0bWw+
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-duplicate-resources.html</string>
+       </dict>
+       <key>WebSubframeArchives</key>
+       <array>
+               <dict>
+                       <key>WebMainResource</key>
+                       <dict>
+                               <key>WebResourceData</key>
+                               <data>
+                               PGh0bWw+PGhlYWQ+CjxsaW5rIHJlbD0ic3R5bGVzaGVl
+                               dCIgaHJlZj0idGVzdC1zdHlsZS5jc3MiIHR5cGU9InRl
+                               eHQvY3NzIj4KPC9oZWFkPjxib2R5Pgo8ZGl2PgogIDxp
+                               bWcgc3JjPSJhcHBsZS5naWYiPgo8L2Rpdj4KPGRpdj4K
+                               ICBUaGlzIGlzIGEgc3ViZnJhbWUuICBUaGlzIHRleHQg
+                               c2hvdWxkIGJlIHJlZCBzYW5zLXNlcmlmLgo8L2Rpdj4K
+                               PGRpdj4KICA8aW1nIHNyYz0iYXBwbGUuZ2lmIj4KPC9k
+                               aXY+CgoKPC9ib2R5PjwvaHRtbD4=
+                               </data>
+                               <key>WebResourceFrameName</key>
+                               <string>&lt;!--framePath //&lt;!--frame0--&gt;--&gt;</string>
+                               <key>WebResourceMIMEType</key>
+                               <string>text/html</string>
+                               <key>WebResourceTextEncodingName</key>
+                               <string>UTF-8</string>
+                               <key>WebResourceURL</key>
+                               <string>file:///LayoutTests/webarchive/resources/test-frame.html</string>
+                       </dict>
+                       <key>WebSubresources</key>
+                       <array>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       ZGl2IHsgZm9udC1mYW1pbHk6IEFyaWFsLCBI
+                                       ZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGNvbG9y
+                                       OiByZWQ7IH0K
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>text/css</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAAQPxAH
+                                       gAYjf+////////+AAtMcHREVHyBXTlMuYmFz
+                                       ZVtOUy5yZWxhdGl2ZYAAgAOABF8QVWZpbGU6
+                                       Ly8vVXNlcnMvZGtpbHplci9Qcm9qZWN0cy9X
+                                       ZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2
+                                       ZS9yZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3PS
+                                       IyQlJlgkY2xhc3Nlc1okY2xhc3NuYW1loyYn
+                                       KFVOU1VSTFYlTlNVUkxYTlNPYmplY3RYdGV4
+                                       dC9jc3PSIyQrLKIsKF1OU1VSTFJlc3BvbnNl
+                                       AAgAEQAbACQAKQAyAEQASQBMAGIAZABsAHIA
+                                       gQCEAIcAigCNAJQAlwCaAJwAngCgAKIApACt
+                                       AK8AtgC+AMoAzADOANABKAEtATYBQQFFAUsB
+                                       UgFbAWQBaQFsAAAAAAAAAgEAAAAAAAAALQAA
+                                       AAAAAAAAAAAAAAAAAXo=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/test-style.css</string>
+                               </dict>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39
+                                       /cnJyaSkpOPj49TU1MHBwbW1terq7Lu7u/X1
+                                       9uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcXF87O
+                                       z/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAA
+                                       ACH5BAEAAB8ALAAAAAA0AEAAQAX/4CeOZGme
+                                       5iFUlYC+cCwKD7FAxxElAiTDnATAcCEYj8aA
+                                       BiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4P
+                                       iZoTaG/fjcuFgj1kBrnIZDLoDzIIgRsTAgYm
+                                       Bk8TEQ4OEGdpbBQLDAUQEA55e32AGxsWHh4F
+                                       BRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+j
+                                       pQkMwArCGsQaCg0KBgEoDwAAHoHRgroW1aEY
+                                       pL7A28LDxcUGGgalhi8IAAgYoOvrn5/soL2l
+                                       wcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHk
+                                       p88EBwU///gjcKCRo0cPOEhwM6fDgUGWMuHK
+                                       tQvUBgBhThhQ4CBCSwhoJDToQKxljlq4BPHC
+                                       No+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqll
+                                       kEFADxMQAKirZs3Du1CiRpX1ZfasN3EGAlsY
+                                       IIADv3MCDnBowKEAQwSGSRzAMEVABIwTmCB4
+                                       yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxA
+                                       kMArgAyuT3gQ5zYwBh8jBmhgoG9EBgYG3BbS
+                                       QHpfBAEKjHSYTt3jxQ4BH3DB2EaLnAYLIgC6
+                                       EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n
+                                       0SrASzQxsTGTFu9hF4B45WESgf8e+EWzy0/N
+                                       lTBOeDk0AtNMcVAQQCcH5LTgLSJJ9c4ooQiw
+                                       jFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQ
+                                       kBAKDAhgxgMdeCBXBGCJFGInvMhj1V/fJMCj
+                                       mSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAwWgmZ
+                                       UeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCT
+                                       l15O+lUPoo3u94MCAERAijrx+NQHBuIo4EGN
+                                       gBRQigcRdAFAArl9EAAbBnWgRaylObCEiQQI
+                                       ECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6Jkd
+                                       JhBAB63/DCstoOAGXhV3LQxeubWQZd/+kBBD
+                                       uF17AKcAaDDAAuEp1G4GDZiAgBRMYODAAgdY
+                                       YBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDu
+                                       CyoUcEVGBlunEUVbuBHHdBwcMNtIfkwQFwYl
+                                       UMDDRA5v9B18FRUMHn22gBUWIZp+QEGeBKSh
+                                       Rnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0c
+                                       rbWN7iiQUgluN7DiK2eQ3cYcFwywQYcy0ggn
+                                       mLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1Fl7Y
+                                       bEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx
+                                       1dYFmWOgh5BiazhcTlhvMpZedMIm2q8kuE1h
+                                       5zNRkMxJM97HJI65D7NBBz2ekNkDLZ0hQQeE
+                                       JZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs
+                                       +o1kVeWXAncywDwD9ZKQmSMBLDAEl13ydCPu
+                                       3CPTnRKgPwP4aARVuoBjEBGW8fivSdkYE/zu
+                                       dCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFq
+                                       A4II1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAah
+                                       tvGkb8DQgM94gWPuAoq6xCMvGKDUDl8YmOig
+                                       IwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCb
+                                       QgRmCq+awAIwgh0bvMo1C6hNZfJ0wBdMwG29
+                                       KQAJy/WtEAAAO1BvbG9udXMK
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>image/gif</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAARBcQQ
+                                       B4AGI3/v////////gALTHB0RFR8gV05TLmJh
+                                       c2VbTlMucmVsYXRpdmWAAIADgARfEFBmaWxl
+                                       Oi8vL1VzZXJzL2RraWx6ZXIvUHJvamVjdHMv
+                                       V2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hp
+                                       dmUvcmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUm
+                                       WCRjbGFzc2VzWiRjbGFzc25hbWWjJicoVU5T
+                                       VVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgA
+                                       EQAbACQAKQAyAEQASQBMAGIAZABsAHIAgQCE
+                                       AIcAigCNAJQAlwCaAJwAngChAKMApQCuALAA
+                                       twC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFX
+                                       AWEBZgFpAAAAAAAAAgEAAAAAAAAALQAAAAAA
+                                       AAAAAAAAAAAAAXc=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+                               </dict>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39
+                                       /cnJyaSkpOPj49TU1MHBwbW1terq7Lu7u/X1
+                                       9uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcXF87O
+                                       z/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAA
+                                       ACH5BAEAAB8ALAAAAAA0AEAAQAX/4CeOZGme
+                                       5iFUlYC+cCwKD7FAxxElAiTDnATAcCEYj8aA
+                                       BiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4P
+                                       iZoTaG/fjcuFgj1kBrnIZDLoDzIIgRsTAgYm
+                                       Bk8TEQ4OEGdpbBQLDAUQEA55e32AGxsWHh4F
+                                       BRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+j
+                                       pQkMwArCGsQaCg0KBgEoDwAAHoHRgroW1aEY
+                                       pL7A28LDxcUGGgalhi8IAAgYoOvrn5/soL2l
+                                       wcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHk
+                                       p88EBwU///gjcKCRo0cPOEhwM6fDgUGWMuHK
+                                       tQvUBgBhThhQ4CBCSwhoJDToQKxljlq4BPHC
+                                       No+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqll
+                                       kEFADxMQAKirZs3Du1CiRpX1ZfasN3EGAlsY
+                                       IIADv3MCDnBowKEAQwSGSRzAMEVABIwTmCB4
+                                       yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxA
+                                       kMArgAyuT3gQ5zYwBh8jBmhgoG9EBgYG3BbS
+                                       QHpfBAEKjHSYTt3jxQ4BH3DB2EaLnAYLIgC6
+                                       EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n
+                                       0SrASzQxsTGTFu9hF4B45WESgf8e+EWzy0/N
+                                       lTBOeDk0AtNMcVAQQCcH5LTgLSJJ9c4ooQiw
+                                       jFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQ
+                                       kBAKDAhgxgMdeCBXBGCJFGInvMhj1V/fJMCj
+                                       mSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAwWgmZ
+                                       UeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCT
+                                       l15O+lUPoo3u94MCAERAijrx+NQHBuIo4EGN
+                                       gBRQigcRdAFAArl9EAAbBnWgRaylObCEiQQI
+                                       ECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6Jkd
+                                       JhBAB63/DCstoOAGXhV3LQxeubWQZd/+kBBD
+                                       uF17AKcAaDDAAuEp1G4GDZiAgBRMYODAAgdY
+                                       YBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDu
+                                       CyoUcEVGBlunEUVbuBHHdBwcMNtIfkwQFwYl
+                                       UMDDRA5v9B18FRUMHn22gBUWIZp+QEGeBKSh
+                                       Rnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0c
+                                       rbWN7iiQUgluN7DiK2eQ3cYcFwywQYcy0ggn
+                                       mLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1Fl7Y
+                                       bEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx
+                                       1dYFmWOgh5BiazhcTlhvMpZedMIm2q8kuE1h
+                                       5zNRkMxJM97HJI65D7NBBz2ekNkDLZ0hQQeE
+                                       JZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs
+                                       +o1kVeWXAncywDwD9ZKQmSMBLDAEl13ydCPu
+                                       3CPTnRKgPwP4aARVuoBjEBGW8fivSdkYE/zu
+                                       dCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFq
+                                       A4II1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAah
+                                       tvGkb8DQgM94gWPuAoq6xCMvGKDUDl8YmOig
+                                       IwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCb
+                                       QgRmCq+awAIwgh0bvMo1C6hNZfJ0wBdMwG29
+                                       KQAJy/WtEAAAO1BvbG9udXMK
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>image/gif</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAARBcQQ
+                                       B4AGI3/v////////gALTHB0RFR8gV05TLmJh
+                                       c2VbTlMucmVsYXRpdmWAAIADgARfEFBmaWxl
+                                       Oi8vL1VzZXJzL2RraWx6ZXIvUHJvamVjdHMv
+                                       V2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hp
+                                       dmUvcmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUm
+                                       WCRjbGFzc2VzWiRjbGFzc25hbWWjJicoVU5T
+                                       VVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgA
+                                       EQAbACQAKQAyAEQASQBMAGIAZABsAHIAgQCE
+                                       AIcAigCNAJQAlwCaAJwAngChAKMApQCuALAA
+                                       twC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFX
+                                       AWEBZgFpAAAAAAAAAgEAAAAAAAAALQAAAAAA
+                                       AAAAAAAAAAAAAXc=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+                               </dict>
+                       </array>
+               </dict>
+       </array>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       aWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAgIGxh
+                       eW91dFRlc3RDb250cm9sbGVyLmR1bXBBc1dlYkFyY2hpdmUoKTsK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>application/x-javascript</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQThAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QWWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvZHVtcC13ZWJhcmNoaXZlLmpz0iMkJSZYJGNsYXNz
+                       ZXNaJGNsYXNzbmFtZaMmJyhVTlNVUkxWJU5TVVJMWE5TT2JqZWN0
+                       XxAYYXBwbGljYXRpb24veC1qYXZhc2NyaXB00iMkKyyiLChdTlNV
+                       UkxSZXNwb25zZQAIABEAGwAkACkAMgBEAEkATABiAGQAbAByAIEA
+                       hACHAIoAjQCUAJcAmgCcAJ4AoACiAKQArQCvALYAvgDKAMwAzgDQ
+                       ASwBMQE6AUUBSQFPAVYBXwF6AX8BggAAAAAAAAIBAAAAAAAAAC0A
+                       AAAAAAAAAAAAAAAAAAGQ
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/dump-webarchive.js</string>
+               </dict>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       ZGl2IHsgZm9udC1mYW1pbHk6IEFyaWFsLCBIZWx2ZXRpY2EsIHNh
+                       bnMtc2VyaWY7IGNvbG9yOiByZWQ7IH0K
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>text/css</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQPxAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QVWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3PSIyQlJlgkY2xhc3Nlc1ok
+                       Y2xhc3NuYW1loyYnKFVOU1VSTFYlTlNVUkxYTlNPYmplY3RYdGV4
+                       dC9jc3PSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAy
+                       AEQASQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngCgAKIA
+                       pACtAK8AtgC+AMoAzADOANABKAEtATYBQQFFAUsBUgFbAWQBaQFs
+                       AAAAAAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXo=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/test-style.css</string>
+               </dict>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       aWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAgIGxh
+                       eW91dFRlc3RDb250cm9sbGVyLmR1bXBBc1dlYkFyY2hpdmUoKTsK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>application/x-javascript</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQThAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QWWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvZHVtcC13ZWJhcmNoaXZlLmpz0iMkJSZYJGNsYXNz
+                       ZXNaJGNsYXNzbmFtZaMmJyhVTlNVUkxWJU5TVVJMWE5TT2JqZWN0
+                       XxAYYXBwbGljYXRpb24veC1qYXZhc2NyaXB00iMkKyyiLChdTlNV
+                       UkxSZXNwb25zZQAIABEAGwAkACkAMgBEAEkATABiAGQAbAByAIEA
+                       hACHAIoAjQCUAJcAmgCcAJ4AoACiAKQArQCvALYAvgDKAMwAzgDQ
+                       ASwBMQE6AUUBSQFPAVYBXwF6AX8BggAAAAAAAAIBAAAAAAAAAC0A
+                       AAAAAAAAAAAAAAAAAAGQ
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/dump-webarchive.js</string>
+               </dict>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       ZGl2IHsgZm9udC1mYW1pbHk6IEFyaWFsLCBIZWx2ZXRpY2EsIHNh
+                       bnMtc2VyaWY7IGNvbG9yOiByZWQ7IH0K
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>text/css</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQPxAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QVWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3PSIyQlJlgkY2xhc3Nlc1ok
+                       Y2xhc3NuYW1loyYnKFVOU1VSTFYlTlNVUkxYTlNPYmplY3RYdGV4
+                       dC9jc3PSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAy
+                       AEQASQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngCgAKIA
+                       pACtAK8AtgC+AMoAzADOANABKAEtATYBQQFFAUsBUgFbAWQBaQFs
+                       AAAAAAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXo=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/test-style.css</string>
+               </dict>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-duplicate-resources.html b/LayoutTests/webarchive/test-duplicate-resources.html
new file mode 100644 (file)
index 0000000..e4cb802
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+<head>
+<script src="resources/dump-webarchive.js" language="javascript" type="text/javascript"></script>
+<link rel="stylesheet" href="resources/test-style.css" type="text/css">
+<script src="resources/dump-webarchive.js" language="javascript" type="text/javascript"></script>
+<link rel="stylesheet" href="resources/test-style.css" type="text/css">
+</head>
+<body>
+<div>
+  <img src="resources/apple.gif">
+</div>
+<div>
+  This is not a frameset.  This text should be red sans-serif.
+</div>
+<div>
+  <img src="resources/apple.gif">
+</div>
+<iframe src="resources/test-frame.html"></iframe>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-frameset-expected.txt b/LayoutTests/webarchive/test-frameset-expected.txt
new file mode 100644 (file)
index 0000000..cce31cb
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48ZnJhbWVzZXQg
+               cm93cz0iKiI+PGZyYW1lIHNyYz0icmVzb3VyY2VzL3Rlc3QtZnJhbWUuaHRt
+               bCIgbmFtZT0ibXlmcmFtZSI+PC9mcmFtZXNldD48L2h0bWw+
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-frameset.html</string>
+       </dict>
+       <key>WebSubframeArchives</key>
+       <array>
+               <dict>
+                       <key>WebMainResource</key>
+                       <dict>
+                               <key>WebResourceData</key>
+                               <data>
+                               PGh0bWw+PGhlYWQ+CjxsaW5rIHJlbD0ic3R5bGVzaGVl
+                               dCIgaHJlZj0idGVzdC1zdHlsZS5jc3MiIHR5cGU9InRl
+                               eHQvY3NzIj4KPC9oZWFkPjxib2R5Pgo8ZGl2PgogIDxp
+                               bWcgc3JjPSJhcHBsZS5naWYiPgo8L2Rpdj4KPGRpdj4K
+                               ICBUaGlzIGlzIGEgc3ViZnJhbWUuICBUaGlzIHRleHQg
+                               c2hvdWxkIGJlIHJlZCBzYW5zLXNlcmlmLgo8L2Rpdj4K
+                               PGRpdj4KICA8aW1nIHNyYz0iYXBwbGUuZ2lmIj4KPC9k
+                               aXY+CgoKPC9ib2R5PjwvaHRtbD4=
+                               </data>
+                               <key>WebResourceFrameName</key>
+                               <string>myframe</string>
+                               <key>WebResourceMIMEType</key>
+                               <string>text/html</string>
+                               <key>WebResourceTextEncodingName</key>
+                               <string>UTF-8</string>
+                               <key>WebResourceURL</key>
+                               <string>file:///LayoutTests/webarchive/resources/test-frame.html</string>
+                       </dict>
+                       <key>WebSubresources</key>
+                       <array>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       ZGl2IHsgZm9udC1mYW1pbHk6IEFyaWFsLCBI
+                                       ZWx2ZXRpY2EsIHNhbnMtc2VyaWY7IGNvbG9y
+                                       OiByZWQ7IH0K
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>text/css</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAAQPxAH
+                                       gAYjf+////////+AAtMcHREVHyBXTlMuYmFz
+                                       ZVtOUy5yZWxhdGl2ZYAAgAOABF8QVWZpbGU6
+                                       Ly8vVXNlcnMvZGtpbHplci9Qcm9qZWN0cy9X
+                                       ZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2
+                                       ZS9yZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3PS
+                                       IyQlJlgkY2xhc3Nlc1okY2xhc3NuYW1loyYn
+                                       KFVOU1VSTFYlTlNVUkxYTlNPYmplY3RYdGV4
+                                       dC9jc3PSIyQrLKIsKF1OU1VSTFJlc3BvbnNl
+                                       AAgAEQAbACQAKQAyAEQASQBMAGIAZABsAHIA
+                                       gQCEAIcAigCNAJQAlwCaAJwAngCgAKIApACt
+                                       AK8AtgC+AMoAzADOANABKAEtATYBQQFFAUsB
+                                       UgFbAWQBaQFsAAAAAAAAAgEAAAAAAAAALQAA
+                                       AAAAAAAAAAAAAAAAAXo=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/test-style.css</string>
+                               </dict>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39
+                                       /cnJyaSkpOPj49TU1MHBwbW1terq7Lu7u/X1
+                                       9uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcXF87O
+                                       z/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAA
+                                       ACH5BAEAAB8ALAAAAAA0AEAAQAX/4CeOZGme
+                                       5iFUlYC+cCwKD7FAxxElAiTDnATAcCEYj8aA
+                                       BiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4P
+                                       iZoTaG/fjcuFgj1kBrnIZDLoDzIIgRsTAgYm
+                                       Bk8TEQ4OEGdpbBQLDAUQEA55e32AGxsWHh4F
+                                       BRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+j
+                                       pQkMwArCGsQaCg0KBgEoDwAAHoHRgroW1aEY
+                                       pL7A28LDxcUGGgalhi8IAAgYoOvrn5/soL2l
+                                       wcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHk
+                                       p88EBwU///gjcKCRo0cPOEhwM6fDgUGWMuHK
+                                       tQvUBgBhThhQ4CBCSwhoJDToQKxljlq4BPHC
+                                       No+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqll
+                                       kEFADxMQAKirZs3Du1CiRpX1ZfasN3EGAlsY
+                                       IIADv3MCDnBowKEAQwSGSRzAMEVABIwTmCB4
+                                       yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxA
+                                       kMArgAyuT3gQ5zYwBh8jBmhgoG9EBgYG3BbS
+                                       QHpfBAEKjHSYTt3jxQ4BH3DB2EaLnAYLIgC6
+                                       EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n
+                                       0SrASzQxsTGTFu9hF4B45WESgf8e+EWzy0/N
+                                       lTBOeDk0AtNMcVAQQCcH5LTgLSJJ9c4ooQiw
+                                       jFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQ
+                                       kBAKDAhgxgMdeCBXBGCJFGInvMhj1V/fJMCj
+                                       mSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAwWgmZ
+                                       UeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCT
+                                       l15O+lUPoo3u94MCAERAijrx+NQHBuIo4EGN
+                                       gBRQigcRdAFAArl9EAAbBnWgRaylObCEiQQI
+                                       ECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6Jkd
+                                       JhBAB63/DCstoOAGXhV3LQxeubWQZd/+kBBD
+                                       uF17AKcAaDDAAuEp1G4GDZiAgBRMYODAAgdY
+                                       YBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDu
+                                       CyoUcEVGBlunEUVbuBHHdBwcMNtIfkwQFwYl
+                                       UMDDRA5v9B18FRUMHn22gBUWIZp+QEGeBKSh
+                                       Rnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0c
+                                       rbWN7iiQUgluN7DiK2eQ3cYcFwywQYcy0ggn
+                                       mLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1Fl7Y
+                                       bEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx
+                                       1dYFmWOgh5BiazhcTlhvMpZedMIm2q8kuE1h
+                                       5zNRkMxJM97HJI65D7NBBz2ekNkDLZ0hQQeE
+                                       JZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs
+                                       +o1kVeWXAncywDwD9ZKQmSMBLDAEl13ydCPu
+                                       3CPTnRKgPwP4aARVuoBjEBGW8fivSdkYE/zu
+                                       dCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFq
+                                       A4II1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAah
+                                       tvGkb8DQgM94gWPuAoq6xCMvGKDUDl8YmOig
+                                       IwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCb
+                                       QgRmCq+awAIwgh0bvMo1C6hNZfJ0wBdMwG29
+                                       KQAJy/WtEAAAO1BvbG9udXMK
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>image/gif</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAARBcQQ
+                                       B4AGI3/v////////gALTHB0RFR8gV05TLmJh
+                                       c2VbTlMucmVsYXRpdmWAAIADgARfEFBmaWxl
+                                       Oi8vL1VzZXJzL2RraWx6ZXIvUHJvamVjdHMv
+                                       V2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hp
+                                       dmUvcmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUm
+                                       WCRjbGFzc2VzWiRjbGFzc25hbWWjJicoVU5T
+                                       VVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgA
+                                       EQAbACQAKQAyAEQASQBMAGIAZABsAHIAgQCE
+                                       AIcAigCNAJQAlwCaAJwAngChAKMApQCuALAA
+                                       twC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFX
+                                       AWEBZgFpAAAAAAAAAgEAAAAAAAAALQAAAAAA
+                                       AAAAAAAAAAAAAXc=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+                               </dict>
+                               <dict>
+                                       <key>WebResourceData</key>
+                                       <data>
+                                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39
+                                       /cnJyaSkpOPj49TU1MHBwbW1terq7Lu7u/X1
+                                       9uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcXF87O
+                                       z/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAA
+                                       ACH5BAEAAB8ALAAAAAA0AEAAQAX/4CeOZGme
+                                       5iFUlYC+cCwKD7FAxxElAiTDnATAcCEYj8aA
+                                       BiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4P
+                                       iZoTaG/fjcuFgj1kBrnIZDLoDzIIgRsTAgYm
+                                       Bk8TEQ4OEGdpbBQLDAUQEA55e32AGxsWHh4F
+                                       BRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+j
+                                       pQkMwArCGsQaCg0KBgEoDwAAHoHRgroW1aEY
+                                       pL7A28LDxcUGGgalhi8IAAgYoOvrn5/soL2l
+                                       wcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHk
+                                       p88EBwU///gjcKCRo0cPOEhwM6fDgUGWMuHK
+                                       tQvUBgBhThhQ4CBCSwhoJDToQKxljlq4BPHC
+                                       No+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqll
+                                       kEFADxMQAKirZs3Du1CiRpX1ZfasN3EGAlsY
+                                       IIADv3MCDnBowKEAQwSGSRzAMEVABIwTmCB4
+                                       yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxA
+                                       kMArgAyuT3gQ5zYwBh8jBmhgoG9EBgYG3BbS
+                                       QHpfBAEKjHSYTt3jxQ4BH3DB2EaLnAYLIgC6
+                                       EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n
+                                       0SrASzQxsTGTFu9hF4B45WESgf8e+EWzy0/N
+                                       lTBOeDk0AtNMcVAQQCcH5LTgLSJJ9c4ooQiw
+                                       jFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQ
+                                       kBAKDAhgxgMdeCBXBGCJFGInvMhj1V/fJMCj
+                                       mSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAwWgmZ
+                                       UeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCT
+                                       l15O+lUPoo3u94MCAERAijrx+NQHBuIo4EGN
+                                       gBRQigcRdAFAArl9EAAbBnWgRaylObCEiQQI
+                                       ECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6Jkd
+                                       JhBAB63/DCstoOAGXhV3LQxeubWQZd/+kBBD
+                                       uF17AKcAaDDAAuEp1G4GDZiAgBRMYODAAgdY
+                                       YBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDu
+                                       CyoUcEVGBlunEUVbuBHHdBwcMNtIfkwQFwYl
+                                       UMDDRA5v9B18FRUMHn22gBUWIZp+QEGeBKSh
+                                       Rnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0c
+                                       rbWN7iiQUgluN7DiK2eQ3cYcFwywQYcy0ggn
+                                       mLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1Fl7Y
+                                       bEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx
+                                       1dYFmWOgh5BiazhcTlhvMpZedMIm2q8kuE1h
+                                       5zNRkMxJM97HJI65D7NBBz2ekNkDLZ0hQQeE
+                                       JZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs
+                                       +o1kVeWXAncywDwD9ZKQmSMBLDAEl13ydCPu
+                                       3CPTnRKgPwP4aARVuoBjEBGW8fivSdkYE/zu
+                                       dCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFq
+                                       A4II1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAah
+                                       tvGkb8DQgM94gWPuAoq6xCMvGKDUDl8YmOig
+                                       IwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCb
+                                       QgRmCq+awAIwgh0bvMo1C6hNZfJ0wBdMwG29
+                                       KQAJy/WtEAAAO1BvbG9udXMK
+                                       </data>
+                                       <key>WebResourceMIMEType</key>
+                                       <string>image/gif</string>
+                                       <key>WebResourceResponse</key>
+                                       <data>
+                                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
+                                       WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
+                                       U0tleWVkQXJjaGl2ZXISAAGGoNEICV8QE1dl
+                                       YlJlc291cmNlUmVzcG9uc2WAAacLDBshIikq
+                                       VSRudWxs1w0ODxAREhMUFRYXGBkaUiQyUiQz
+                                       UiQ0UiQwViRjbGFzc1IkNVIkMYAFgAARBcQQ
+                                       B4AGI3/v////////gALTHB0RFR8gV05TLmJh
+                                       c2VbTlMucmVsYXRpdmWAAIADgARfEFBmaWxl
+                                       Oi8vL1VzZXJzL2RraWx6ZXIvUHJvamVjdHMv
+                                       V2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hp
+                                       dmUvcmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUm
+                                       WCRjbGFzc2VzWiRjbGFzc25hbWWjJicoVU5T
+                                       VVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgA
+                                       EQAbACQAKQAyAEQASQBMAGIAZABsAHIAgQCE
+                                       AIcAigCNAJQAlwCaAJwAngChAKMApQCuALAA
+                                       twC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFX
+                                       AWEBZgFpAAAAAAAAAgEAAAAAAAAALQAAAAAA
+                                       AAAAAAAAAAAAAXc=
+                                       </data>
+                                       <key>WebResourceURL</key>
+                                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+                               </dict>
+                       </array>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-frameset.html b/LayoutTests/webarchive/test-frameset.html
new file mode 100644 (file)
index 0000000..a0d5d53
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<frameset rows="*">
+  <frame src="resources/test-frame.html" name="myframe">
+</frameset>
+</html>
diff --git a/LayoutTests/webarchive/test-img-src-expected.txt b/LayoutTests/webarchive/test-img-src-expected.txt
new file mode 100644 (file)
index 0000000..845484d
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keT4KICA8
+               aW1nIHNyYz0icmVzb3VyY2VzL2FwcGxlLmdpZiI+CgoKPC9ib2R5PjwvaHRt
+               bD4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-img-src.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-img-src.html b/LayoutTests/webarchive/test-img-src.html
new file mode 100644 (file)
index 0000000..a220114
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body>
+  <img src="resources/apple.gif">
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-input-src-expected.txt b/LayoutTests/webarchive/test-input-src-expected.txt
new file mode 100644 (file)
index 0000000..3ddfb7c
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keT4KPGZv
+               cm0+CjxpbnB1dCB0eXBlPSJpbWFnZSIgc3JjPSJyZXNvdXJjZXMvYXBwbGUu
+               Z2lmIj4KPC9mb3JtPgoKCjwvYm9keT48L2h0bWw+
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-input-src.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-input-src.html b/LayoutTests/webarchive/test-input-src.html
new file mode 100644 (file)
index 0000000..aaa31e5
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body>
+<form>
+<input type="image" src="resources/apple.gif">
+</form>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-link-href-expected.txt b/LayoutTests/webarchive/test-link-href-expected.txt
new file mode 100644 (file)
index 0000000..020e757
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjxsaW5rIHJlbD0ic3R5bGVz
+               aGVldCIgaHJlZj0icmVzb3VyY2VzL3Rlc3Qtc3R5bGUuY3NzIiB0eXBlPSJ0
+               ZXh0L2NzcyI+CjwvaGVhZD48Ym9keT4KPGRpdj4KVGhpcyB0ZXh0IHNob3Vs
+               ZCBiZSByZWQgc2Fucy1zZXJpZi4KPC9kaXY+CgoKPC9ib2R5PjwvaHRtbD4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-link-href.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       ZGl2IHsgZm9udC1mYW1pbHk6IEFyaWFsLCBIZWx2ZXRpY2EsIHNh
+                       bnMtc2VyaWY7IGNvbG9yOiByZWQ7IH0K
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>text/css</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQPxAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QVWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvdGVzdC1zdHlsZS5jc3PSIyQlJlgkY2xhc3Nlc1ok
+                       Y2xhc3NuYW1loyYnKFVOU1VSTFYlTlNVUkxYTlNPYmplY3RYdGV4
+                       dC9jc3PSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAy
+                       AEQASQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngCgAKIA
+                       pACtAK8AtgC+AMoAzADOANABKAEtATYBQQFFAUsBUgFbAWQBaQFs
+                       AAAAAAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXo=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/test-style.css</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-link-href.html b/LayoutTests/webarchive/test-link-href.html
new file mode 100644 (file)
index 0000000..425c7b3
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+<link rel="stylesheet" href="resources/test-style.css" type="text/css">
+</head>
+<body>
+<div>
+This text should be red sans-serif.
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-object-data-expected.txt b/LayoutTests/webarchive/test-object-data-expected.txt
new file mode 100644 (file)
index 0000000..0f80d45
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keT4KICA8
+               b2JqZWN0IGRhdGE9InJlc291cmNlcy9hcHBsZS5naWYiIHR5cGU9ImltYWdl
+               L2dpZiI+PC9vYmplY3Q+CgoKPC9ib2R5PjwvaHRtbD4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-object-data.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-object-data.html b/LayoutTests/webarchive/test-object-data.html
new file mode 100644 (file)
index 0000000..c02de04
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body>
+  <object data="resources/apple.gif" type="image/gif"></object>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-script-src-expected.txt b/LayoutTests/webarchive/test-script-src-expected.txt
new file mode 100644 (file)
index 0000000..d5ffdae
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQgc3JjPSJyZXNvdXJjZXMvZHVtcC13ZWJh
+               cmNoaXZlLmpzIiB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPjwvc2NyaXB0Pgo8
+               L2hlYWQ+PGJvZHk+CgoKPC9ib2R5PjwvaHRtbD4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-script-src.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       aWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAgIGxh
+                       eW91dFRlc3RDb250cm9sbGVyLmR1bXBBc1dlYkFyY2hpdmUoKTsK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>application/x-javascript</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAAQThAHgAYjf+////////+AAtMcHREVHyBXTlMuYmFzZVtOUy5y
+                       ZWxhdGl2ZYAAgAOABF8QWWZpbGU6Ly8vVXNlcnMvZGtpbHplci9Q
+                       cm9qZWN0cy9XZWJLaXQvTGF5b3V0VGVzdHMvd2ViYXJjaGl2ZS9y
+                       ZXNvdXJjZXMvZHVtcC13ZWJhcmNoaXZlLmpz0iMkJSZYJGNsYXNz
+                       ZXNaJGNsYXNzbmFtZaMmJyhVTlNVUkxWJU5TVVJMWE5TT2JqZWN0
+                       XxAYYXBwbGljYXRpb24veC1qYXZhc2NyaXB00iMkKyyiLChdTlNV
+                       UkxSZXNwb25zZQAIABEAGwAkACkAMgBEAEkATABiAGQAbAByAIEA
+                       hACHAIoAjQCUAJcAmgCcAJ4AoACiAKQArQCvALYAvgDKAMwAzgDQ
+                       ASwBMQE6AUUBSQFPAVYBXwF6AX8BggAAAAAAAAIBAAAAAAAAAC0A
+                       AAAAAAAAAAAAAAAAAAGQ
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/dump-webarchive.js</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-script-src.html b/LayoutTests/webarchive/test-script-src.html
new file mode 100644 (file)
index 0000000..ba129fd
--- /dev/null
@@ -0,0 +1,7 @@
+<html>
+<head>
+<script src="resources/dump-webarchive.js" type="text/javascript"></script>
+</head>
+<body>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-table-background-expected.txt b/LayoutTests/webarchive/test-table-background-expected.txt
new file mode 100644 (file)
index 0000000..645cd14
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keT4KICA8
+               dGFibGUgYmFja2dyb3VuZD0icmVzb3VyY2VzL2FwcGxlLmdpZiIgc3R5bGU9
+               IndpZHRoOiA1MnB4OyBoZWlnaHQ6IDY0cHg7Ij4KICAgIDx0Ym9keT48dHI+
+               PC90cj48L3Rib2R5PjwvdGFibGU+CgoKPC9ib2R5PjwvaHRtbD4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-table-background.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-table-background.html b/LayoutTests/webarchive/test-table-background.html
new file mode 100644 (file)
index 0000000..ee4d2e4
--- /dev/null
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body>
+  <table background="resources/apple.gif" style="width: 52px; height: 64px;">
+    <tr>
+    </tr>
+  </table>
+</body>
+</html>
diff --git a/LayoutTests/webarchive/test-td-background-expected.txt b/LayoutTests/webarchive/test-td-background-expected.txt
new file mode 100644 (file)
index 0000000..3bf0b00
--- /dev/null
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PGh0bWw+PGhlYWQ+CjxzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRl
+               c3RDb250cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1
+               bXBBc1dlYkFyY2hpdmUoKTsKPC9zY3JpcHQ+CjwvaGVhZD48Ym9keT4KICA8
+               dGFibGU+CiAgICA8dGJvZHk+PHRyPjx0ZCBiYWNrZ3JvdW5kPSJyZXNvdXJj
+               ZXMvYXBwbGUuZ2lmIj4KICAgICAgICA8cCBzdHlsZT0id2lkdGg6IDUycHg7
+               IGhlaWdodDogNjRweDsiPjwvcD4KICAgICAgPC90ZD48L3RyPjwvdGJvZHk+
+               PC90YWJsZT4KCgo8L2JvZHk+PC9odG1sPg==
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>text/html</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/webarchive/test-td-background.html</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       R0lGODlhNABAAMQfAGJiYvLz9ImKitvb2/39/cnJyaSkpOPj49TU
+                       1MHBwbW1terq7Lu7u/X19uXm5+3u7+fo6eDg4e/w8t7e3/n5+RcX
+                       F87Oz/f398fHx9fX16+vr9HR0fDw8Pj4+MzMzAAAACH5BAEAAB8A
+                       LAAAAAA0AEAAQAX/4CeOZGme5iFUlYC+cCwKD7FAxxElAiTDnATA
+                       cCEYj8aABiBIDCIbjQCgqBEojUCjQSEEpoXTAUCQLB4PiZoTaG/f
+                       jcuFgj1kBrnIZDLoDzIIgRsTAgYmBk8TEQ4OEGdpbBQLDAUQEA55
+                       e32AGxsWHh4FBRgJCQgFAhQoCwIDlgsSFxyFOnt8foAInp+jpQkM
+                       wArCGsQaCg0KBgEoDwAAHoHRgroW1aEYpL7A28LDxcUGGgalhi8I
+                       AAgYoOvrn5/soL2lwcThEBQAAz/7JxYAXVcCPNjggp/BEwIYOHNm
+                       wMHBErMSEMgCR47FC3EwwnlzocOFBxMy3NHkp88EBwU///gjcKCR
+                       o0cPOEhwM6fDgUGWMuHKtQvUBgBhThhQ4CBCSwhoJDToQKxljlq4
+                       BPHCNo+bggXEXnwZMNMAupJ/ckm9RvUXg27dvqllkEFADxMQAKir
+                       Zs3Du1CiRpX1ZfasN3EGAlsYIIADv3MCDnBowKEAQwSGSRzAMEVA
+                       BIwTmCB4yHkEQQMACQDY0LmzgAlXZF0ac6D0QwUJOAxAkMArgAyu
+                       T3gQ5zYwBh8jBmhgoG9EBgYG3BbSQHpfBAEKjHSYTt3jxQ4BH3DB
+                       2EaLnAYLIgC6EyGuBhMDyDSI2X3jlu8Vay7480TPrU250p8n0SrA
+                       SzQxsTGTFu9hF4B45WESgf8e+EWzy0/NlTBOeDk0AtNMcVAQQCcH
+                       5LTgLSJJ9c4ooQiwjFAI7GGUhWkE0AFWv+GQB4N/6OJJPNnMY0EA
+                       ACyAgmMSLIKUBBxQgEoGRX0IIk8j5hiMNwxQkBAKDAhgxgMdeCBX
+                       BGCJFGInvMhj1V/fJMCjmSVEAEBcAFiQS4jS9HSNNk+mpZZaBmAw
+                       WgmZUeNJJ4DWJUqOdI6JZ2DjEHKiCRwEBg88BbCTl15O+lUPoo3u
+                       94MCAERAijrx+NQHBuIo4EGNgBRQigcRdAFAArl9EAAbBnWgRayl
+                       ObCEiQQIECGu+2i5gBEaxgUcsDJk1sAVtp4xJbIy6JkdJhBAB63/
+                       DCstoOAGXhV3LQxeubWQZd/+kBBDuF17AKcAaDDAAuEp1G4GDZiA
+                       gBRMYODAAgdYYBsD+zjgFUAUVGedERf8NO49AQ2YkX85ZNDuCyoU
+                       cEVGBlunEUVbuBHHdBwcMNtIfkwQFwYlUMDDRA5v9B18FRUMHn22
+                       gBUWIZp+QEGeBKShRnceu5cRHbLdodNO0aSngAlV2vCIBD4PSOB7
+                       c0hidCb31TgNDyfEdcElLz3Cwdgt07HAHY0crbWN7iiQUgluN7Di
+                       K2eQ3cYcFwywQYcy0ggnmLx48FNrQllQ1FGvxIQhBQ+o0wgmUIU1
+                       Fl7YbEBZByggskeFjiQVAAUQKFDJ/2p5REUNjlSx1dYFmWOgh5Bi
+                       azhcTlhvMpZedMIm2q8kuE1h5zNRkMxJM97HJI65D7NBBz2ekNkD
+                       LZ0hQQeEJZAkjbafPmdVdhKDQAMAEC5hAg8g9XlyeNRs+o1kVeWX
+                       AncywDwD9ZKQmSMBLDAEl13ydCPu3CPTnRKgPwP4aARVuoBjEBGW
+                       8fivSdkYE/zudCcPCMADvUOXNOIEJtQVCi0CxFN6HlCCKgFqA4II
+                       1F0A6L46kQlRgRkDBk0ghV3Q5YYQxAahtvGkb8DQgM94gWPuAoq6
+                       xCMvGKDUDl8YmOigIwYyjNSjpriOQUXQUpfilwAc8gMhZCABc8Hh
+                       NSJlgTkOgoIUZykG+UQTFIMohBEIKGN9BmCbQgRmCq+awAIwgh0b
+                       vMo1C6hNZfJ0wBdMwG29KQAJy/WtEAAAO1BvbG9udXMK
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/gif</string>
+                       <key>WebResourceResponse</key>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAacLDBshIikqVSRudWxs1w0O
+                       DxAREhMUFRYXGBkaUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYAF
+                       gAARBcQQB4AGI3/v////////gALTHB0RFR8gV05TLmJhc2VbTlMu
+                       cmVsYXRpdmWAAIADgARfEFBmaWxlOi8vL1VzZXJzL2RraWx6ZXIv
+                       UHJvamVjdHMvV2ViS2l0L0xheW91dFRlc3RzL3dlYmFyY2hpdmUv
+                       cmVzb3VyY2VzL2FwcGxlLmdpZtIjJCUmWCRjbGFzc2VzWiRjbGFz
+                       c25hbWWjJicoVU5TVVJMViVOU1VSTFhOU09iamVjdFlpbWFnZS9n
+                       aWbSIyQrLKIsKF1OU1VSTFJlc3BvbnNlAAgAEQAbACQAKQAyAEQA
+                       SQBMAGIAZABsAHIAgQCEAIcAigCNAJQAlwCaAJwAngChAKMApQCu
+                       ALAAtwC/AMsAzQDPANEBJAEpATIBPQFBAUcBTgFXAWEBZgFpAAAA
+                       AAAAAgEAAAAAAAAALQAAAAAAAAAAAAAAAAAAAXc=
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/webarchive/resources/apple.gif</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/webarchive/test-td-background.html b/LayoutTests/webarchive/test-td-background.html
new file mode 100644 (file)
index 0000000..4a8f75c
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsWebArchive();
+</script>
+</head>
+<body>
+  <table>
+    <tr>
+      <td background="resources/apple.gif">
+        <p style="width: 52px; height: 64px;"></p>
+      </td>
+    </tr>
+  </table>
+</body>
+</html>
index 257def0..0b39c29 100644 (file)
@@ -1,3 +1,21 @@
+2006-12-28  David Kilzer  <ddkilzer@webkit.org>
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11882
+        Need a way to regression test .webarchive output files
+
+        Implement layoutTestController.dumpAsWebArchive() to test WebArchive format.
+        Saves WebArchive plist in xml format, then alters file:// URLs to remove path
+        where WebKit was checked out.
+
+        * DumpRenderTree/DumpRenderTree.m:
+        (serializeWebArchiveToXML): Added.
+        (dump):
+        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+        (-[LayoutTestController dumpAsWebArchive]): Added.
+        (runTest):
+
 2006-12-28  George Staikos  <staikos@kde.org>
 
         Reviewed by Olliej.
index a62a4f3..57a3917 100644 (file)
@@ -114,6 +114,7 @@ static WebFrame *topLoadingFrame;     // !nil iff a load is in progress
 static BOOL waitToDump;     // TRUE if waitUntilDone() has been called, but notifyDone() has not yet been called
 
 static BOOL dumpAsText;
+static BOOL dumpAsWebArchive;
 static BOOL dumpSelectionRect;
 static BOOL dumpTitleChanges;
 static BOOL dumpBackForwardList;
@@ -498,6 +499,33 @@ static void dumpFrameScrollPosition(WebFrame *f)
     }
 }
 
+static NSString *serializeWebArchiveToXML(WebArchive *webArchive)
+{
+    NSString *errorString;
+    NSDictionary *propertyList = [NSPropertyListSerialization propertyListFromData:[webArchive data]
+                                                                  mutabilityOption:NSPropertyListImmutable
+                                                                            format:NULL
+                                                                  errorDescription:&errorString];
+    if (!propertyList)
+        return errorString;
+
+    NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:propertyList
+                                                                 format:NSPropertyListXMLFormat_v1_0
+                                                       errorDescription:&errorString];
+    if (!xmlData)
+        return errorString;
+
+    // Normalize URLs in XML for testing
+    NSMutableString *result = [[NSMutableString alloc] initWithData:xmlData encoding:NSUTF8StringEncoding];
+    NSString *cwdURL = [@"file://" stringByAppendingString:[[[NSFileManager defaultManager] currentDirectoryPath] stringByExpandingTildeInPath]];
+    [result replaceOccurrencesOfString:cwdURL
+                            withString:@"file://"
+                               options:NSLiteralSearch
+                                 range:NSMakeRange(0, [result length])];
+
+    return [result autorelease];
+}
+
 static void dump(void)
 {
     NSString *result = nil;
@@ -506,6 +534,9 @@ static void dump(void)
         if (dumpAsText) {
             DOMElement *documentElement = [[frame DOMDocument] documentElement];
             result = [[(DOMElement *)documentElement innerText] stringByAppendingString:@"\n"];
+        } else if (dumpAsWebArchive) {
+            WebArchive *webArchive = [[frame DOMDocument] webArchive];
+            result = serializeWebArchiveToXML(webArchive);
         } else {
             bool isSVGW3CTest = ([currentTest rangeOfString:@"svg/W3C-SVG-1.1"].length);
             if (isSVGW3CTest)
@@ -514,12 +545,19 @@ static void dump(void)
                 [[frame webView] setFrameSize:NSMakeSize(maxViewWidth, maxViewHeight)];
             result = [frame renderTreeAsExternalRepresentation];
         }
-        
-        if (!result)
-            printf("ERROR: nil result from %s", dumpAsText ? "[documentElement innerText]" : "[frame renderTreeAsExternalRepresentation]");
-        else {
+
+        if (!result) {
+            const char *errorMessage;
+            if (dumpAsText)
+                errorMessage = "[documentElement innerText]";
+            else if (dumpAsWebArchive)
+                errorMessage = "[[frame DOMDocument] webArchive]";
+            else
+                errorMessage = "[frame renderTreeAsExternalRepresentation]";
+            printf("ERROR: nil result from %s", errorMessage);
+        } else {
             fputs([result UTF8String], stdout);
-            if (!dumpAsText)
+            if (!dumpAsText && !dumpAsWebArchive)
                 dumpFrameScrollPosition(frame);
         }
 
@@ -560,7 +598,7 @@ static void dump(void)
     }
     
     if (dumpPixels) {
-        if (!dumpAsText) {
+        if (!dumpAsText && !dumpAsWebArchive) {
             // grab a bitmap from the view
             WebView* view = [frame webView];
             NSSize webViewSize = [view frame].size;
@@ -761,6 +799,7 @@ static void dump(void)
     if (aSelector == @selector(waitUntilDone)
             || aSelector == @selector(notifyDone)
             || aSelector == @selector(dumpAsText)
+            || aSelector == @selector(dumpAsWebArchive)
             || aSelector == @selector(dumpTitleChanges)
             || aSelector == @selector(dumpBackForwardList)
             || aSelector == @selector(dumpChildFrameScrollPositions)
@@ -843,6 +882,11 @@ static void dump(void)
     dumpAsText = YES;
 }
 
+- (void)dumpAsWebArchive
+{
+    dumpAsWebArchive = YES;
+}
+
 - (void)dumpSelectionRect
 {
     dumpSelectionRect = YES;
@@ -1011,6 +1055,7 @@ static void runTest(const char *pathOrURL)
     topLoadingFrame = nil;
     waitToDump = NO;
     dumpAsText = NO;
+    dumpAsWebArchive = NO;
     dumpChildFrameScrollPositions = NO;
     shouldDumpEditingCallbacks = NO;
     dumpSelectionRect = NO;