3 This test checks to make sure that pending prerenders which are canceled
4 while pending never start.
6 <link id=thePrerender rel=prerender
href=
"does_not_exist.html" />
8 <title>Prerender Page
</title>
10 <script src=
"prerender_events_common.js"></script>
13 var pageWasPrerendered
= false;
15 function DidPrerenderPass() {
16 pageWasPrerendered
= true;
17 var link
= document
.getElementById('thePrerender');
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);