| OLD | NEW |
| (Empty) |
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
PropertyList-1.0.dtd"> | |
| 3 <plist version="1.0"> | |
| 4 <dict> | |
| 5 <key>WebMainResource</key> | |
| 6 <dict> | |
| 7 <key>WebResourceData</key> | |
| 8 <string><html><head> | |
| 9 | |
| 10 <script> | |
| 11 | |
| 12 if (window.testRunner) { | |
| 13 testRunner.dumpDOMAsWebArchive(); | |
| 14 testRunner.setCanOpenWindows(); | |
| 15 testRunner.waitUntilDone(); | |
| 16 } | |
| 17 | |
| 18 var secondWindow = null; | |
| 19 | |
| 20 function startTest() | |
| 21 { | |
| 22 secondWindow = window.open("resources/adopt-attribute-styled-body-second-win
dow.html", "TestWindow"); | |
| 23 if (!secondWindow) { | |
| 24 alert("When running this test under Safari, popup blocking must be disab
led."); | |
| 25 return; | |
| 26 } | |
| 27 tryAdoptNode(); | |
| 28 } | |
| 29 | |
| 30 function tryAdoptNode() | |
| 31 { | |
| 32 window.bodyToAdopt = secondWindow.document.getElementById("otherBody"); | |
| 33 if (!secondWindow.doneWithBody || !window.bodyToAdopt) { | |
| 34 setTimeout("tryAdoptNode()", 10); | |
| 35 return; | |
| 36 } | |
| 37 | |
| 38 secondWindow.close(); | |
| 39 | |
| 40 document.getElementById("iframeSpan").innerHTML = "<iframe src='resources
/adopt-attribute-styled-body-iframe.html'></iframe>"; | |
| 41 | |
| 42 procedeAfterClosedWindow(); | |
| 43 } | |
| 44 | |
| 45 function procedeAfterClosedWindow() | |
| 46 { | |
| 47 if (!secondWindow.closed || window.bodyToAdopt) { | |
| 48 setTimeout("procedeAfterClosedWindow()", 10); | |
| 49 return; | |
| 50 } | |
| 51 | |
| 52 secondWindow = null; | |
| 53 | |
| 54 if (window.GCController) { | |
| 55 GCController.collect(); | |
| 56 if (window.testRunner) | |
| 57 testRunner.notifyDone(); | |
| 58 else | |
| 59 alert("How strange - You have window.GCController, but no window.tes
tRunner. How did this happen?"); | |
| 60 } | |
| 61 else | |
| 62 alert("Now wait for garbage collection to have occured, then save the cu
rrent page as a WebArchive."); | |
| 63 } | |
| 64 | |
| 65 </script> | |
| 66 </head> | |
| 67 | |
| 68 <body onload="startTest();"> | |
| 69 <span id="testSpan">This test takes a body with inline link color styling
from a second window, moves it to the document of an iframe, makes sure the | |
| 70 second window has closed, then makes a WebArchive. The test passes if it doesn'
t crash. If running the test in Safari then garbage collection might get in the | |
| 71 way of fulling testing the bug. One should wait "awhile" before making the WebA
rchive.<br></span><br> | |
| 72 <span id="iframeSpan"><iframe src="resources/adopt-attribute-styled-bod
y-iframe.html"></iframe></span> | |
| 73 | |
| 74 | |
| 75 </body></html></string> | |
| 76 <key>WebResourceFrameName</key> | |
| 77 <string></string> | |
| 78 <key>WebResourceMIMEType</key> | |
| 79 <string>text/html</string> | |
| 80 <key>WebResourceTextEncodingName</key> | |
| 81 <string>UTF-8</string> | |
| 82 <key>WebResourceURL</key> | |
| 83 <string>file:///LayoutTests/webarchive/adopt-attribute-styled-bo
dy-webarchive.html</string> | |
| 84 </dict> | |
| 85 <key>WebSubframeArchives</key> | |
| 86 <array> | |
| 87 <dict> | |
| 88 <key>WebMainResource</key> | |
| 89 <dict> | |
| 90 <key>WebResourceData</key> | |
| 91 <string><html><head><script> | |
| 92 if (window.parent.bodyToAdopt) { | |
| 93 document.getElementsByTagName("html")[0].appendChild(document.adoptNode(wind
ow.parent.bodyToAdopt)); | |
| 94 window.parent.bodyToAdopt = null; | |
| 95 } else | |
| 96 alert("window.parent.bodyToAdopt is not set - Are you viewing this page as p
art of the adopt-attribute-styled-body test?"); | |
| 97 </script> | |
| 98 </head><body id="otherBody" vlink="green" alink="green"> | |
| 99 <a href="SomeUnvisitedPage.html">Spaceballs: The Unvisited Link</a>&
lt;br> | |
| 100 <a href="about:blank">Spaceballs: The Visited Link</a> | |
| 101 | |
| 102 | |
| 103 </body><body></body></html></string> | |
| 104 <key>WebResourceFrameName</key> | |
| 105 <string><!--framePath //<!--frame0-->--
></string> | |
| 106 <key>WebResourceMIMEType</key> | |
| 107 <string>text/html</string> | |
| 108 <key>WebResourceTextEncodingName</key> | |
| 109 <string>UTF-8</string> | |
| 110 <key>WebResourceURL</key> | |
| 111 <string>file:///LayoutTests/webarchive/resources
/adopt-attribute-styled-body-iframe.html</string> | |
| 112 </dict> | |
| 113 </dict> | |
| 114 </array> | |
| 115 </dict> | |
| 116 </plist> | |
| OLD | NEW |