OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 This test checks to make sure plugins aren't loaded when a page is prerendered, | 3 This test checks to make sure plugins aren't loaded when a page is prerendered, |
4 but are loaded once the page is displayed. | 4 but are loaded once the page is displayed. |
| 5 |
| 6 This test relies on the Pepper plugin (but not the placeholder) implementing |
| 7 the postMessage() function on the plugin object. |
5 --> | 8 --> |
6 <head> | 9 <head> |
7 <title>Prerender Plugin Delay Loading</title> | 10 <title>Prerender Plugin Delay Loading</title> |
8 | 11 |
9 <script> | 12 <script> |
10 // Make sure plugin was not loaded while prerendering. | 13 // Make sure plugin was not loaded while prerendering. |
11 function DidPrerenderPass() { | 14 function DidPrerenderPass() { |
12 // |plugin| should be the blocked plugin placeholder, rather than the | 15 // |plugin| should be the blocked plugin placeholder, rather than the |
13 // test plugin. | 16 // test plugin. |
14 var plugin = window.document['plugin']; | 17 var plugin = window.document['plugin']; |
15 return plugin.getURL == undefined; | 18 return plugin.postMessage == undefined; |
16 } | 19 } |
17 | 20 |
18 // Make sure plugin loads once the page is displayed. | 21 // Make sure plugin loads once the page is displayed. |
19 function DidDisplayPass() { | 22 function DidDisplayPass() { |
20 var plugin = window.document['plugin']; | 23 var plugin = window.document['plugin']; |
21 return plugin.getURL != undefined; | 24 return plugin.postMessage != undefined; |
22 } | 25 } |
23 </script> | 26 </script> |
24 | 27 |
25 </head> | 28 </head> |
26 <body> | 29 <body> |
27 <embed name="plugin" type="application/x-webkit-test-netscape"></embed> | 30 <embed name="plugin" type="application/x-ppapi-tests"></embed> |
28 </body> | 31 </body> |
29 </html> | 32 </html> |
OLD | NEW |