| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <script> | |
| 5 | |
| 6 if (window.testRunner) { | |
| 7 testRunner.dumpDOMAsWebArchive(); | |
| 8 testRunner.setCanOpenWindows(); | |
| 9 testRunner.waitUntilDone(); | |
| 10 } | |
| 11 | |
| 12 var otherWindow = null; | |
| 13 | |
| 14 function startTest() | |
| 15 { | |
| 16 otherWindow = window.open("resources/adopt-attribute-styled-node-second-wind
ow.html", "TestWindow"); | |
| 17 if (!otherWindow) { | |
| 18 alert("When running this test under Safari, popup blocking must be disab
led."); | |
| 19 return; | |
| 20 } | |
| 21 tryAdoptNode(); | |
| 22 } | |
| 23 | |
| 24 function tryAdoptNode() | |
| 25 { | |
| 26 var otherMarquee = otherWindow.document.getElementById("otherMarquee"); | |
| 27 if (!otherMarquee) { | |
| 28 setTimeout("tryAdoptNode()", 10); | |
| 29 return; | |
| 30 } | |
| 31 | |
| 32 var adoptedMarquee = document.adoptNode(otherMarquee); | |
| 33 document.getElementById("testSpan").appendChild(adoptedMarquee); | |
| 34 otherWindow.close(); | |
| 35 | |
| 36 procedeAfterClosedWindow(); | |
| 37 } | |
| 38 | |
| 39 function procedeAfterClosedWindow() | |
| 40 { | |
| 41 if (!otherWindow.closed) { | |
| 42 setTimeout("procedeAfterClosedWindow()", 10); | |
| 43 return; | |
| 44 } | |
| 45 | |
| 46 otherWindow = null; | |
| 47 | |
| 48 if (window.GCController) { | |
| 49 GCController.collect(); | |
| 50 if (window.testRunner) | |
| 51 testRunner.notifyDone(); | |
| 52 else | |
| 53 alert("How strange - You have window.GCController, but no window.tes
tRunner. How did this happen?"); | |
| 54 } | |
| 55 else | |
| 56 alert("Now wait for garbage collection to have occured, then save the cu
rrent page as a WebArchive."); | |
| 57 } | |
| 58 | |
| 59 </script> | |
| 60 </head> | |
| 61 | |
| 62 <body onload="startTest();"> | |
| 63 <span id="testSpan">This test takes a node with mapped style attributes from a d
ifferent document, moves it to this document, makes sure the other document has
closed, | |
| 64 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 | |
| 65 way of fulling testing the bug. One should wait "awhile" before making the WebA
rchive.<br></span> | |
| 66 </body> | |
| 67 </html> | |
| OLD | NEW |