3 This test checks to make sure that a page that writes to localstorage fails to
7 <title>Prerender local storage write
</title>
10 window
.localStorage
.removeItem("prerender_test");
11 window
.localStorage
.setItem("prerender_test", "foo");
12 var pageWasPrerendered
= false;
14 // Make sure plugin was not loaded while prerendering.
15 function DidPrerenderPass() {
16 pageWasPrerendered
= true;
20 // Make sure DidPrerenderPass() was called first. Otherwise, the page was
21 // most likely reloaded instead of using the prerendered page.
22 function DidDisplayPass() {
23 var foo
= window
.localStorage
.getItem("prerender_test");
24 return pageWasPrerendered
&& foo
=== "foo";