Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_visibility.html
blob1180cb2d11e48483c5051389c9660a8873fc0401
1 <html>
2 <!--
3 This test checks the visibility API when a prerendered page is displayed.
4 -->
5 <head>
6 <title>Prerender Visibility</title>
8 <script src="prerender_visibility_shared.js"></script>
10 <script>
11 // Checks that no visibility change events have occurred, current visibility
12 // state is "prerender", and visibility state while the page was loading was
13 // also "prerender".
14 function DidPrerenderPass() {
15 return visibilityStates.length == 1 &&
16 hiddenValues.length == 1 &&
17 visibilityStates[0] == 'prerender' &&
18 hiddenValues[0] == true &&
19 document.visibilityState == 'prerender' &&
20 document.hidden == true;
23 // Checks that we've only had three visibility states:
24 // prerender -> hidden -> visible.
25 // Also checks current visibility state.
26 function DidDisplayPass() {
27 return visibilityStates.length == 3 &&
28 hiddenValues.length == 3 &&
29 visibilityStates[1] == 'hidden' &&
30 hiddenValues[1] == true &&
31 visibilityStates[2] == 'visible' &&
32 hiddenValues[2] == false &&
33 document.visibilityState == 'visible' &&
34 document.hidden == false;
36 </script>
38 </head>
39 <body></body>
40 </html>