RenderEmbeddedObject::isReplacementObscured is wrong if an obscuring element has...
[WebKit-https.git] / LayoutTests / plugins / crash-restoring-plugin-page-from-page-cache.html
1 <head>
2 <script>
3 if (window.testRunner) {
4     testRunner.dumpAsText();
5     testRunner.waitUntilDone();
6     testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
7     testRunner.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
8 }
9
10 function pageShown() {
11     if (event.persisted)
12         setTimeout("testComplete()", 0);   
13     else
14         setTimeout("startTest()", 0);
15 }
16
17 function testComplete() {
18     alert("Made it back!");
19     if (window.testRunner)
20         testRunner.notifyDone();
21 }
22
23 function startTest() {
24     document.getElementById("ExamplePlugin").setAttribute("style", "display:none");
25     window.location.href = 'resources/go-back.html';
26 }
27
28 </script>
29
30 <style>
31     object { border-color: red; border-width: 2px; border-style:solid; }
32 </style>
33 </head>
34
35 <body onpageshow="pageShown();">
36     
37 This test - assuming it will pass - does the following:<br>
38 1 - Has nested plugin elements<br>
39 2 - Leaves the page, and the page enters the page cache<br>
40 3 - Returns, pulling the page from the page cache<br>
41 4 - Doesn't crash<br>
42 <br>
43 If you're not running under DRT, you'll need to leave the page then return to it yourself.
44 <br>
45 <object>
46 <object>
47 <object>
48 <object>
49 <object>
50 <object>
51 <object>
52 <object>
53 <object>
54 <object>
55 <object>
56 <object>
57 <object>
58 <object>
59 <object>
60 <object>
61 <object>
62 <object>
63 <object>
64 <object>
65
66 <object type="application/x-shockwave-flash" width="500" height="375" id="ExamplePlugin">
67     <img src="resources/apple.gif">
68 </object>
69
70 Some fallback text to force a renderer.
71
72 </object>
73 </object>
74 </object>
75 </object>
76 </object>
77 </object>
78 </object>
79 </object>
80 </object>
81 </object>
82 </object>
83 </object>
84 </object>
85 </object>
86 </object>
87 </object>
88 </object>
89 </object>
90 </object>
91 </object><br><br>
92
93 (Yes, the extreme number of object elements are necessary to more reliably reproduce the crash.  Leave them.)
94 </body>