blob: 69eb97670ec97c84e458dd0d277423eb99a1fbd7 [file] [log] [blame]
<?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>&lt;html&gt;&lt;head&gt;
&lt;script&gt;
if (window.layoutTestController) {
layoutTestController.dumpDOMAsWebArchive();
layoutTestController.setCanOpenWindows();
layoutTestController.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 = "&lt;iframe src='resources/adopt-attribute-styled-body-iframe.html'&gt;&lt;/iframe&gt;";
procedeAfterClosedWindow();
}
function procedeAfterClosedWindow()
{
if (!secondWindow.closed || window.bodyToAdopt) {
setTimeout("procedeAfterClosedWindow()", 10);
return;
}
secondWindow = null;
if (window.GCController) {
GCController.collect();
if (window.layoutTestController)
layoutTestController.notifyDone();
else
alert("How strange - You have window.GCController, but no window.layoutTestController. How did this happen?");
}
else
alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
}
&lt;/script&gt;
&lt;/head&gt;&lt;body onload="startTest();"&gt;
&lt;span id="testSpan"&gt;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.&lt;br&gt;&lt;/span&gt;&lt;br&gt;
&lt;span id="iframeSpan"&gt;&lt;iframe src="resources/adopt-attribute-styled-body-iframe.html"&gt;&lt;/iframe&gt;&lt;/span&gt;
&lt;/body&gt;&lt;/html&gt;</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>&lt;html&gt;&lt;head&gt;&lt;script&gt;
if (!window.parent.bodyToAdopt) {
alert("window.parent.bodyToAdopt is not set - Are you viewing this page as part of the adopt-attribute-styled-body test?");
return;
}
document.getElementsByTagName("html")[0].appendChild(document.adoptNode(window.parent.bodyToAdopt));
window.parent.bodyToAdopt = null;
&lt;/script&gt;
&lt;/head&gt;&lt;body id="otherBody" vlink="green" alink="green"&gt;
&lt;a href="SomeUnvisitedPage.html"&gt;Spaceballs: The Unvisited Link&lt;/a&gt;&lt;br&gt;
&lt;a href="about:blank"&gt;Spaceballs: The Visited Link&lt;/a&gt;
&lt;/body&gt;&lt;/html&gt;</string>
<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/adopt-attribute-styled-body-iframe.html</string>
</dict>
</dict>
</array>
</dict>
</plist>