OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <style> |
| 4 #plugin { |
| 5 width: 150px; |
| 6 height: 150px; |
| 7 } |
| 8 </style> |
| 9 </head> |
| 10 |
| 11 <body> |
| 12 <embed id="plugin" type="application/x-webkit-test-webplugin-persistent" primiti
ve="triangle" background-color="green" primitive-color="blue"></embed> |
| 13 <div>Each line below should start with 'Pass':</div> |
| 14 <div id="result1"></div> |
| 15 <div id="result2"></div> |
| 16 <script> |
| 17 |
| 18 if (!window.testRunner) { |
| 19 document.write("This test does not work in manual mode."); |
| 20 } else { |
| 21 testRunner.dumpAsText(); |
| 22 testRunner.waitUntilDone(); |
| 23 |
| 24 if (plugin.isPersistent) |
| 25 result1.innerHTML = "Pass: plugin identifies itself as persistent."; |
| 26 else |
| 27 result1.innerHTML = "Fail: plugin identifies itself as not-persistent.
"; |
| 28 |
| 29 // Verify that the plugin is not destroyed. |
| 30 plugin.setAttribute("display", "none"); |
| 31 // Force synchronous style recalc. |
| 32 plugin.offsetTop; |
| 33 |
| 34 window.setTimeout(function () { |
| 35 if (plugin.instanceId == 1) |
| 36 result2.innerHTML = "Pass: plugin is persisting."; |
| 37 else |
| 38 result2.innerHTML = "Fail: plugin failed to persist."; |
| 39 testRunner.notifyDone(); |
| 40 }, 50); |
| 41 } |
| 42 |
| 43 </script> |
| 44 </body> |
| 45 </html> |
OLD | NEW |