Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_page_removes_pending.html
blob296b1ee28d43d8ef8113332a1a63a6dd341f2ab3
1 <html>
2 <!--
3 This test checks to make sure that pending prerenders which are canceled
4 while pending never start.
5 -->
6 <link id=thePrerender rel=prerender href="does_not_exist.html" />
7 <head>
8 <title>Prerender Page</title>
10 <script src="prerender_events_common.js"></script>
12 <script>
13 var pageWasPrerendered = false;
15 function DidPrerenderPass() {
16 pageWasPrerendered = true;
17 var link = document.getElementById('thePrerender');
18 if (link)
19 link.parentElement.removeChild(link)
20 return !GetPrerenderEventCount(0, 'webkitprerenderstart');
23 // Make sure DidPrerenderPass() was called first. Otherwise, the page was
24 // most likely reloaded instead of using the prerendered page.
25 function DidDisplayPass() {
26 return pageWasPrerendered &&
27 !GetPrerenderEventCount(0, 'webkitprerenderstart');
30 var link = document.getElementById('thePrerender');
31 AddEventHandlersToLinkElement(link, 0);
32 </script>
34 </head>
35 <body></body>
36 </html>