| OLD | NEW |
| (Empty) |
| 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 --run-layout-test\", as it req
uires existence of window.internals."); | |
| 10 } else { | |
| 11 testRunner.waitUntilDone(); | |
| 12 window.jsTestIsAsync = true; | |
| 13 var documentsBefore; | |
| 14 var documentsAfter; | |
| 15 // FIXME(keishi): Calling asyncGC twice to fix flakiness, crbug.com/674194 | |
| 16 asyncGC(function() { | |
| 17 asyncGC(function() { | |
| 18 documentsBefore = window.internals.numberOfLiveDocuments(); | |
| 19 | |
| 20 var frame = document.getElementById('frame'); | |
| 21 frame.contentDocument.body.innerHTML = '<form></form>'; | |
| 22 document.body.removeChild(frame); | |
| 23 frame = null; | |
| 24 | |
| 25 // FIXME(keishi): crbug.com/674194 | |
| 26 asyncGC(function() { | |
| 27 asyncGC(function() { | |
| 28 documentsAfter = window.internals.numberOfLiveDocuments(); | |
| 29 | |
| 30 // -1 is from removing frame itself. | |
| 31 shouldBe('documentsBefore - 1', 'documentsAfter'); | |
| 32 finishJSTest(); | |
| 33 }); | |
| 34 }); | |
| 35 }); | |
| 36 }); | |
| 37 } | |
| 38 </script> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |