Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_localstorage_write.html
blob284c136629c54df7ff28ba977c8467491ef35c8d
1 <html>
2 <!--
3 This test checks to make sure that a page that writes to localstorage fails to
4 prerender.
5 -->
6 <head>
7 <title>Prerender local storage write</title>
9 <script>
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;
17 return 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";
26 </script>
28 </head>
29 <body></body>
30 </html>