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

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

Issue 129383002: Better test coverage for prerender sessionStorage merging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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
1 <html> 1 <html>
2 <!-- 2 <!--
3 This test checks to make sure that a prerendered page is loaded. 3 This test checks to make sure that the prerendered page was loaded with the
4 correct sessionStorage namespace.
4 --> 5 -->
5 <head> 6 <head>
6 <title>Prerender Page</title> 7 <title>Prerender Page</title>
7 8
8 <script> 9 <script>
9 var pageWasPrerendered = false; 10 var pageWasPrerendered = false;
10 11
11 function DidPrerenderPass() { 12 function DidPrerenderPass() {
12 pageWasPrerendered = true; 13 pageWasPrerendered = true;
13 return true; 14 return true;
14 } 15 }
15 16
16 // Make sure DidPrerenderPass() was called first. Otherwise, the page was 17 // Verify the sessionStorage value was set.
17 // most likely reloaded instead of using the prerendered page.
18 function DidDisplayPass() { 18 function DidDisplayPass() {
19 return pageWasPrerendered; 19 return pageWasPrerendered && sessionStorage.value === "hello";
20 } 20 }
21 </script> 21 </script>
22 22
23 </head> 23 </head>
24 <body></body> 24 <body></body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698