Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_page_pending.html
blobe3253990988b2edbd3dc02fcffa38aa8a6f033ad
1 <html>
2 <!--
3 This test checks to make sure that pending prerenders start at page launch,
4 but not earlier.
5 -->
6 <link id=thePrerender rel=prerender href="prerender_page.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 return !GetPrerenderEventCount(0, 'webkitprerenderstart');
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 return pageWasPrerendered;
26 var link = document.getElementById('thePrerender');
27 AddEventHandlersToLinkElement(link, 0);
28 </script>
30 </head>
31 <body></body>
32 </html>