Home | History | Annotate | Download | only in manual
      1 <html><head><title>
      2 <body>
      3 <script type="text/javascript">
      4 function deletePlugin() {
      5   // Remove the plugin.
      6   document.getElementById('foo').removeChild(document.getElementById('plugin'));
      7 
      8   // Forces a style recalculation which actually will delete the plugin.
      9   // Without this, the plugin would be deleted later from a timer. If the test
     10   // fails, this line will cause the crash.
     11   var foo = document.getElementById('foo').offsetWidth;
     12 
     13   // If we get here, there's no crash so we succeeded.
     14   document.cookie = "COMPLETION_COOKIE=PASS; path=/";
     15 }
     16 </script>
     17   This test tests deleting a the &lt;object&gt; synchronously from within a
     18   script call. Neither the proxy nor the PPAPI implementation should crash in
     19   this case.
     20   <div id="foo">
     21     <object id="plugin" type="application/x-ppapi-tests" width="400" height="400" style="border:5px solid blue;">
     22       <param name="customtest" value="delete_plugin">
     23     </object>
     24   </div>
     25 </body>
     26