Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/test/data/prerender/prerender_visibility_hidden.html

Issue 8392041: Prerendered tabs use the same SessionStorage namespace as the tab that triggered the prerender. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove check Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <!--
3 This test checks the visibility API when a prerendered page is visited without
4 being displayed.
5 -->
6 <head>
7 <title>Prerender Visibility Hidden</title>
8
9 <script src="prerender_visibility_shared.js"></script>
10
11 <script>
12 // Checks that no visibility change events have occurred, current visibility
13 // state is "prerender", and visibility state while the page was loading was
14 // also "prerender".
15 function DidPrerenderPass() {
16 return visibilityStates.length == 1 &&
17 hiddenValues.length == 1 &&
18 visibilityStates[0] == 'prerender' &&
19 hiddenValues[0] == true &&
20 document.webkitVisibilityState == 'prerender' &&
21 document.webkitHidden == true;
22 }
23
24 // Checks one and only one visibility change even occurred, and resulted in a
25 // hidden state, and that current state is also hidden.
26 function DidDisplayPass() {
27 return visibilityStates.length == 2 &&
28 hiddenValues.length == 2 &&
29 visibilityStates[1] == 'hidden' &&
30 hiddenValues[1] == true &&
31 document.webkitVisibilityState == 'hidden' &&
32 document.webkitHidden == true;
33 }
34 </script>
35
36 </head>
37 <body></body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698