Unreviewed, rolling out r100835.
[WebKit-https.git] / Source / WebCore / manual-tests / compositing / show-composited-iframe-on-back-button.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5     <!--
6         This content was originally intended as a layout test, but the sequencing performed by 
7         queueBackNavigation/queueForwardNavigation differs somehow from what occurs when hitting 
8         the back and forward buttons, so the error does not occur. I've left all the LayoutTestController 
9         logic in the test in case this is fixed in the future.
10     -->
11     
12     <title>Show composited iframe contents when navigating back to page</title>
13     <style type="text/css" media="screen">
14         #box {
15             background-color: red;
16             width: 100px;
17             height: 100px;
18             -webkit-transform: translateZ(0);
19         }
20         iframe {
21             margin: 20px;
22             height: 250px;
23             width: 250px;
24             border: 1px solid black;
25         }
26     
27         .composited {
28             -webkit-transform: translateZ(0);
29         }
30     
31     </style>
32     <script type="text/javascript" charset="utf-8">
33         var dumpLayerTree = function()
34         {
35             if (window.layoutTestController) {
36                 document.getElementById('layers').innerHTML += "Layer Tree after\n\n"+layoutTestController.layerTreeAsText()+"\n\n";
37             }
38         }
39         
40         if (window.layoutTestController) {
41             layoutTestController.dumpAsText();
42         }
43         
44         function onPageShow(evt)
45         {
46             if (!evt.persisted && window.layoutTestController) {
47                 // this is the first time the page has been loaded, then setup the
48                 // to-be-tested scenario.
49                 document.getElementById('layers').innerHTML = "Layer Tree before\n\n"+layoutTestController.layerTreeAsText()+"\n\n";
50                 layoutTestController.queueLoad("resources/subframe.html");
51                 layoutTestController.queueBackNavigation(1);
52                 layoutTestController.queueForwardNavigation(1);
53                 layoutTestController.queueBackNavigation(1);
54                 layoutTestController.queueNonLoadingScript("dumpLayerTree()");
55             }
56         }
57
58         window.onpageshow = onPageShow;
59     </script>
60 </head>
61 <body>
62 <p>
63     This page has a composited iframe. When navigating to a new page and then back to this one, the iframe contents should show up.
64 </p>
65     Click on the following URL and then click back. When navigating back to this page, the blue box inside the black rectangle
66     should show up.
67 </p>
68 <pre>
69               <a href="http://apple.com">http://apple.com</a>
70 </pre>
71     <div id=box></div>
72     <iframe id="iframe" scrolling="no" src="resources/composited-subframe.html"></iframe>
73 <br>
74 <pre id="layers"></pre>
75 </body>
76 </html>