OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../fast/js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <span>This test only runs on DumpRenderTree, as it requires existence of win dow.internals and cross-domain resource access check disabled.</span> | 6 <span>This test only runs on DumpRenderTree, as it requires existence of win dow.internals and cross-domain resource access check disabled.</span> |
7 <iframe id="f" src='about:blank'></iframe> | 7 <iframe id="f" src='about:blank'></iframe> |
8 <script> | 8 <script> |
9 description("This test asserts that document doesn't leak when a selecti on is created inside the document."); | 9 description("This test asserts that document doesn't leak when a selecti on is created inside the document."); |
10 | 10 |
11 jsTestIsAsync = true; | 11 jsTestIsAsync = true; |
12 if (!window.internals) | 12 if (!window.internals) |
13 finishJSTest(); | 13 finishJSTest(); |
(...skipping 21 matching lines...) Expand all Loading... | |
35 | 35 |
36 frame.onload = function() { | 36 frame.onload = function() { |
37 // document unloaded... | 37 // document unloaded... |
38 | 38 |
39 numberOfDocumentsAfter = countNumberOfLiveDocuments(); | 39 numberOfDocumentsAfter = countNumberOfLiveDocuments(); |
40 shouldBe("numberOfDocumentsAfter", "numberOfDocumentsBefore"); | 40 shouldBe("numberOfDocumentsAfter", "numberOfDocumentsBefore"); |
41 finishJSTest(); | 41 finishJSTest(); |
42 } | 42 } |
43 frame.src = 'about:blank'; | 43 frame.src = 'about:blank'; |
44 } | 44 } |
45 frame.src='data:text/html;charset=utf-8,<span id="t"></span>'; | 45 frame.src='data:text/html;charset=utf-8,<script>keep = document.createNo deIterator(document, NodeFilter.SHOW_ELEMENT, function(node) { return NodeFilter .SHOW_ELEMENT; }, false);</script'+'>'; |
haraken
2013/08/01 03:44:15
Instead of adding one test file for one leak you d
dominicc (has gone to gerrit)
2013/08/01 04:51:12
Duplicating this is a shame, can you just put a do
kouhei (in TOK)
2013/08/01 05:09:58
Done. Unified to fast/dom/leak-document.html
| |
46 </script> | 46 </script> |
47 <script src="../../fast/js/resources/js-test-post.js"></script> | 47 <script src="../../js/resources/js-test-post.js"></script> |
48 </body> | 48 </body> |
49 </html> | 49 </html> |
OLD | NEW |