| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <body onload="startTest()"> | 2 <body onload="startTest()"> |
| 3 | 3 |
| 4 <p id="description"></p> | 4 <p id="description"></p> |
| 5 <div id="console"></div> | 5 <div id="console"></div> |
| 6 | 6 |
| 7 <script src="../js/resources/js-test-pre.js"></script> | 7 <script src="../js/resources/js-test-pre.js"></script> |
| 8 | 8 |
| 9 <script> | 9 <script> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 debug("Loaded all frames."); | 28 debug("Loaded all frames."); |
| 29 | 29 |
| 30 frame1 = document.getElementById("topFrame1"); | 30 frame1 = document.getElementById("topFrame1"); |
| 31 frame2 = document.getElementById("topFrame2"); | 31 frame2 = document.getElementById("topFrame2"); |
| 32 frame3 = document.getElementById("topFrame3"); | 32 frame3 = document.getElementById("topFrame3"); |
| 33 frame4 = document.getElementById("topFrame4"); | 33 frame4 = document.getElementById("topFrame4"); |
| 34 subFrame1 = frame3.contentDocument.getElementById("subIframe1"); | 34 subFrame1 = frame3.contentDocument.getElementById("subIframe1"); |
| 35 subFrame2 = frame3.contentDocument.getElementById("subIframe2"); | 35 subFrame2 = frame3.contentDocument.getElementById("subIframe2"); |
| 36 | 36 |
| 37 document.addEventListener( | 37 document.addEventListener( |
| 38 "webkitvisibilitystatechange", onMainPageVisibilityChange, false); | 38 "webkitvisibilitychange", onMainPageVisibilityChange, false); |
| 39 frame2.contentDocument.addEventListener( | 39 frame2.contentDocument.addEventListener( |
| 40 "webkitvisibilitystatechange", onFrame2VisibilityChange, false); | 40 "webkitvisibilitychange", onFrame2VisibilityChange, false); |
| 41 // Change the visibility of the current page to invisible. | 41 // Change the visibility of the current page to invisible. |
| 42 if (window.layoutTestController) { | 42 if (window.layoutTestController) { |
| 43 numVisibilityChanges++; | 43 numVisibilityChanges++; |
| 44 layoutTestController.setPageVisibility("hidden"); | 44 layoutTestController.setPageVisibility("hidden"); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 function finishTest() { | 48 function finishTest() { |
| 49 if (window.layoutTestController) | 49 if (window.layoutTestController) |
| 50 layoutTestController.resetPageVisibility(); | 50 layoutTestController.resetPageVisibility(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 </script> | 102 </script> |
| 103 | 103 |
| 104 <script src="../js/resources/js-test-post.js"></script> | 104 <script src="../js/resources/js-test-post.js"></script> |
| 105 | 105 |
| 106 <iframe id="topFrame1" onload="startTest()" ></iframe> | 106 <iframe id="topFrame1" onload="startTest()" ></iframe> |
| 107 <iframe id="topFrame2" onload="startTest()" ></iframe> | 107 <iframe id="topFrame2" onload="startTest()" ></iframe> |
| 108 <iframe id="topFrame3" onload="startTest()" src="resources/page-visibility-ifram
e-delete-test-frame.html"></iframe> | 108 <iframe id="topFrame3" onload="startTest()" src="resources/page-visibility-ifram
e-delete-test-frame.html"></iframe> |
| 109 <iframe id="topFrame4" onload="startTest()" ></iframe> | 109 <iframe id="topFrame4" onload="startTest()" ></iframe> |
| 110 </body> | 110 </body> |
| 111 </html> | 111 </html> |
| OLD | NEW |