Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / forms / associatedFormControls-leak-nodes.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <iframe id="frame"></iframe>
5
6 <script src="../../resources/js-test.js"></script>
7 <script>
8 if (!window.internals) {
9     debug("This test only runs on \"content_shell --dump-render-tree\", as it requires existence of window.internals.");
10 } else {
11     gc();
12     var documentsBefore = window.internals.numberOfLiveDocuments();
13
14     var frame = document.getElementById('frame');
15     frame.contentDocument.body.innerHTML = '<form></form>';
16     document.body.removeChild(frame);
17     frame = null;
18
19     gc();
20     var documentsAfter = window.internals.numberOfLiveDocuments();
21
22     // -1 is from removing frame itself.
23     shouldBe('documentsBefore - 1', 'documentsAfter');
24 }
25 </script>
26 </body>
27 </html>