| testRunner.dumpDOMAsWebArchive(); |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| otherWindow = window.open("resources/adopt-inline-styled-node-second-window.html", "TestWindow"); |
| alert("When running this test under Safari, popup blocking must be disabled."); |
| var otherSpan = otherWindow.document.getElementById("otherSpan"); |
| setTimeout("tryAdoptNode()", 10); |
| var adoptedSpan = document.adoptNode(otherSpan); |
| document.getElementById("testSpan").appendChild(adoptedSpan); |
| procedeAfterClosedWindow(); |
| function procedeAfterClosedWindow() |
| if (!otherWindow.closed) { |
| setTimeout("procedeAfterClosedWindow()", 10); |
| if (window.GCController) { |
| alert("How strange - You have window.GCController, but no window.testRunner. How did this happen?"); |
| alert("Now wait for garbage collection to have occured, then save the current page as a WebArchive."); |
| <body onload="startTest();"> |
| <span id="testSpan">This test takes a node with inline style from a different document, moves it to this document, makes sure the other document has closed, |
| then makes a WebArchive from this document. 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> |