| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE plist PUBLIC "-//Apple//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> |
| <string><html><head> |
| |
| <script> |
| |
| if (window.testRunner) { |
| testRunner.dumpDOMAsWebArchive(); |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| } |
| |
| var secondWindow = null; |
| |
| function startTest() |
| { |
| secondWindow = window.open("resources/adopt-attribute-styled-body-second-window.html", "TestWindow"); |
| if (!secondWindow) { |
| alert("When running this test under Safari, popup blocking must be disabled."); |
| return; |
| } |
| tryAdoptNode(); |
| } |
| |
| function tryAdoptNode() |
| { |
| window.bodyToAdopt = secondWindow.document.getElementById("otherBody"); |
| if (!secondWindow.doneWithBody || !window.bodyToAdopt) { |
| setTimeout("tryAdoptNode()", 10); |
| return; |
| } |
| |
| secondWindow.close(); |
| |
| document.getElementById("iframeSpan").innerHTML = "<iframe src='resources/adopt-attribute-styled-body-iframe.html'></iframe>"; |
| |
| procedeAfterClosedWindow(); |
| } |
| |
| function procedeAfterClosedWindow() |
| { |
| if (!secondWindow.closed || window.bodyToAdopt) { |
| setTimeout("procedeAfterClosedWindow()", 10); |
| return; |
| } |
| |
| secondWindow = null; |
| |
| if (window.GCController) { |
| GCController.collect(); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| else |
| alert("How strange - You have window.GCController, but no window.testRunner. How did this happen?"); |
| } |
| else |
| alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive."); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="startTest();"> |
| <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 |
| 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 |
| way of fulling testing the bug. One should wait "awhile" before making the WebArchive.<br></span><br> |
| <span id="iframeSpan"><iframe src="resources/adopt-attribute-styled-body-iframe.html"></iframe></span> |
| |
| |
| </body></html></string> |
| <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/adopt-attribute-styled-body-webarchive.html</string> |
| </dict> |
| <key>WebSubframeArchives</key> |
| <array> |
| <dict> |
| <key>WebMainResource</key> |
| <dict> |
| <key>WebResourceData</key> |
| <string><html><head><script> |
| if (window.parent.bodyToAdopt) { |
| document.getElementsByTagName("html")[0].appendChild(document.adoptNode(window.parent.bodyToAdopt)); |
| window.parent.bodyToAdopt = null; |
| } else |
| alert("window.parent.bodyToAdopt is not set - Are you viewing this page as part of the adopt-attribute-styled-body test?"); |
| </script> |
| </head><body id="otherBody" vlink="green" alink="green"> |
| <a href="SomeUnvisitedPage.html">Spaceballs: The Unvisited Link</a><br> |
| <a href="about:blank">Spaceballs: The Visited Link</a> |
| |
| |
| </body><body></body></html></string> |
| <key>WebResourceFrameName</key> |
| <string><!--frame1--></string> |
| <key>WebResourceMIMEType</key> |
| <string>text/html</string> |
| <key>WebResourceTextEncodingName</key> |
| <string>UTF-8</string> |
| <key>WebResourceURL</key> |
| <string>file:///LayoutTests/webarchive/resources/adopt-attribute-styled-body-iframe.html</string> |
| </dict> |
| </dict> |
| </array> |
| </dict> |
| </plist> |