Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: LayoutTests/webarchive/adopt-attribute-styled-body-webarchive.html

Issue 14046041: Remove webarchive tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 secondWindow = null;
13
14 function startTest()
15 {
16 secondWindow = window.open("resources/adopt-attribute-styled-body-second-win dow.html", "TestWindow");
17 if (!secondWindow) {
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 window.bodyToAdopt = secondWindow.document.getElementById("otherBody");
27 if (!secondWindow.doneWithBody || !window.bodyToAdopt) {
28 setTimeout("tryAdoptNode()", 10);
29 return;
30 }
31
32 secondWindow.close();
33
34 document.getElementById("iframeSpan").innerHTML = "<iframe src='resources/ad opt-attribute-styled-body-iframe.html'></iframe>";
35
36 procedeAfterClosedWindow();
37 }
38
39 function procedeAfterClosedWindow()
40 {
41 if (!secondWindow.closed || window.bodyToAdopt) {
42 setTimeout("procedeAfterClosedWindow()", 10);
43 return;
44 }
45
46 secondWindow = 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 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 WebA rchive.<br></span><br>
66 <span id="iframeSpan"></span>
67 </body>
68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698