| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <!-- | |
| 3 This test checks the visibility API when a prerendered page is displayed | |
| 4 before the page has finished loading. | |
| 5 | |
| 6 TODO(mmenke): Currently, we get get extra events when a page is shown on | |
| 7 Windows. Make this check for extra events once that's fixed. | |
| 8 --> | |
| 9 <head> | |
| 10 <title>Prerender Visibility Quick Switch</title> | |
| 11 | |
| 12 <script> | |
| 13 // Checks that the the current state is visible. Due to expected races between | |
| 14 // loading the page and switching to the tab, it's possible for the page to | |
| 15 // start out with visibility 'prerender', 'hidden', or 'visible'. | |
| 16 function DidDisplayPass() { | |
| 17 return !document.webkitHidden && | |
| 18 'visible' == document.webkitVisibilityState; | |
| 19 } | |
| 20 </script> | |
| 21 | |
| 22 </head> | |
| 23 <body></body> | |
| 24 </html> | |
| 25 <html> | |
| 26 <!-- | |
| 27 This test checks the visibility API when a prerendered page is displayed | |
| 28 before the page has finished loading. | |
| 29 | |
| 30 TODO(mmenke): Currently, we get get extra events when a page is shown on | |
| 31 Windows. Make this check for extra events once that's fixed. | |
| 32 --> | |
| 33 <head> | |
| 34 <title>Prerender Visibility Quick Switch</title> | |
| 35 | |
| 36 <script> | |
| 37 // Checks that the the current state is visible. Due to expected races between | |
| 38 // loading the page and switching to the tab, it's possible for the page to | |
| 39 // start out with visibility 'prerender', 'hidden', or 'visible'. | |
| 40 function DidDisplayPass() { | |
| 41 return !document.webkitHidden && | |
| 42 'visible' == document.webkitVisibilityState; | |
| 43 } | |
| 44 </script> | |
| 45 | |
| 46 </head> | |
| 47 <body></body> | |
| 48 </html> | |
| OLD | NEW |