OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test checks to make sure that a prerendered page is loaded. | 3 This test checks to make sure that a prerendered page is loaded. |
4 --> | 4 --> |
5 <head> | 5 <head> |
6 <title>Prerender Page</title> | 6 <title>Prerender Page</title> |
7 | 7 |
8 <script> | 8 <script> |
9 var pageWasPrerendered = false; | 9 var pageWasPrerendered = false; |
10 | 10 |
11 // Make sure plugin was not loaded while prerendering. | |
12 function DidPrerenderPass() { | 11 function DidPrerenderPass() { |
13 pageWasPrerendered = true; | 12 pageWasPrerendered = true; |
14 return true; | 13 return true; |
15 } | 14 } |
16 | 15 |
17 // Make sure DidPrerenderPass() was called first. Otherwise, the page was | 16 // Make sure DidPrerenderPass() was called first. Otherwise, the page was |
18 // most likely reloaded instead of using the prerendered page. | 17 // most likely reloaded instead of using the prerendered page. |
19 function DidDisplayPass() { | 18 function DidDisplayPass() { |
20 return pageWasPrerendered; | 19 return pageWasPrerendered; |
21 } | 20 } |
22 </script> | 21 </script> |
23 | 22 |
24 </head> | 23 </head> |
25 <body></body> | 24 <body></body> |
26 </html> | 25 </html> |
OLD | NEW |