dom/plugins/test/crashtests/540114-1.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:387e12fa0f5e
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <head>
4 <script type="text/javascript">
5 function crashplugin() {
6 var plugin = document.getElementById('removeme');
7 var flush_reflow = plugin.offsetHeight; // this may not be necessary
8 document.body.removeChild(plugin);
9 // Give the plugin time to crash
10 setTimeout(function() { document.documentElement.removeAttribute('class') },
11 1000);
12 }
13
14 function getTestCases() {
15 return [
16 { testPassed:
17 (function () {
18 // Assuming the same process is used for removeme and checkme
19 var plugin = document.getElementById('checkme');
20 try {
21 plugin.getPaintCount();
22 return true;
23 } catch (e) {
24 return false;
25 }
26 }),
27 testDescription:
28 (function () {
29 return "plugin should not crash";
30 })
31 }
32 ];
33 }
34 </script>
35 </head>
36 <body onload="crashplugin();">
37 <embed id="checkme" type="application/x-test"/>
38 <embed id="removeme" type="application/x-test" wmode="window" cleanupwidget="false"/>
39 </body>
40 </html>

mercurial