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> |
OLD | NEW |