OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
2 <html> | |
3 <head> | |
4 <script src="../../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <script> | |
8 description("Test that a plugin that fails to release the window script object d
oesn't result in the window's document being leaked"); | |
9 | |
10 if (window.internals) { | |
11 // Test that the live document count returns to the initial value, rather th
an to a specific value, so this test is robust to leaks in preceding tests. | |
12 gc(); | |
13 var initialLiveDocumentCount = window.internals.numberOfLiveDocuments(); | |
14 | |
15 var iframe = document.createElement('iframe'); | |
16 document.body.appendChild(iframe); | |
17 iframe.contentWindow.document.documentElement.innerHTML = '<embed id="plugin
" type="application/x-webkit-test-netscape" test="leak-window-scriptable-object"
></embed>'; | |
18 | |
19 shouldBeTrue("window.internals.numberOfLiveDocuments() > initialLiveDocument
Count"); | |
20 | |
21 document.body.removeChild(iframe); | |
22 | |
23 gc(); | |
24 shouldBeTrue("window.internals.numberOfLiveDocuments() == initialLiveDocumen
tCount"); | |
25 } | |
26 | |
27 var successfullyParsed = true; | |
28 </script> | |
29 </body> | |
30 </html> | |
OLD | NEW |