WebMainResource WebResourceData <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> WebResourceFrameName WebResourceMIMEType text/html WebResourceTextEncodingName UTF-8 WebResourceURL file:///LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html WebSubframeArchives WebMainResource WebResourceData <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> WebResourceFrameName <!--frame1--> WebResourceMIMEType text/html WebResourceTextEncodingName UTF-8 WebResourceURL file:///LayoutTests/webarchive/resources/adopt-attribute-styled-body-iframe.html