Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / prerender / prerender_plugin_delay_load.html
blob4a84c735906d71560995bfb2d3997bc5718ffc22
1 <html>
2 <!--
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.
6 This test relies on the Pepper plugin (but not the placeholder) implementing
7 the postMessage() function on the plugin object.
8 -->
9 <head>
10 <title>Prerender Plugin Delay Loading</title>
12 <script>
13 // Make sure plugin was not loaded while prerendering.
14 function DidPrerenderPass() {
15 // |plugin| should be the blocked plugin placeholder, rather than the
16 // test plugin.
17 var plugin = window.document['plugin'];
18 return plugin.postMessage == undefined;
21 // Make sure plugin loads once the page is displayed.
22 function DidDisplayPass() {
23 var plugin = window.document['plugin'];
24 return plugin.postMessage != undefined;
26 </script>
28 </head>
29 <body>
30 <embed name="plugin" type="application/x-ppapi-tests"></embed>
31 </body>
32 </html>