4 <iframe id=
"frame"></iframe>
6 <script src=
"../../resources/js-test.js"></script>
8 if (!window
.internals
) {
9 debug("This test only runs on \"content_shell --run-layout-test\", as it requires existence of window.internals.");
11 testRunner
.waitUntilDone();
12 window
.jsTestIsAsync
= true;
16 documentsBefore
= window
.internals
.numberOfLiveDocuments();
18 var frame
= document
.getElementById('frame');
19 frame
.contentDocument
.body
.innerHTML
= '<form></form>';
20 document
.body
.removeChild(frame
);
24 documentsAfter
= window
.internals
.numberOfLiveDocuments();
26 // -1 is from removing frame itself.
27 shouldBe('documentsBefore - 1', 'documentsAfter');