6 if (window.testRunner) {
7 testRunner.dumpDOMAsWebArchive();
8 testRunner.setCanOpenWindows();
9 testRunner.waitUntilDone();
12 var secondWindow = null;
16 secondWindow = window.open("resources/adopt-attribute-styled-body-second-window.html", "TestWindow");
18 alert("When running this test under Safari, popup blocking must be disabled.");
24 function tryAdoptNode()
26 window.bodyToAdopt = secondWindow.document.getElementById("otherBody");
27 if (!secondWindow.doneWithBody || !window.bodyToAdopt) {
28 setTimeout("tryAdoptNode()", 10);
34 document.getElementById("iframeSpan").innerHTML = "<iframe src='resources/adopt-attribute-styled-body-iframe.html'></iframe>";
36 procedeAfterClosedWindow();
39 function procedeAfterClosedWindow()
41 if (!secondWindow.closed || window.bodyToAdopt) {
42 setTimeout("procedeAfterClosedWindow()", 10);
48 if (window.GCController) {
49 GCController.collect();
50 if (window.testRunner)
51 testRunner.notifyDone();
53 alert("How strange - You have window.GCController, but no window.testRunner. How did this happen?");
56 alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive.");
62 <body onload="startTest();">
63 <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
64 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
65 way of fulling testing the bug. One should wait "awhile" before making the WebArchive.<br></span><br>
66 <span id="iframeSpan"></span>