| <script src="../resources/js-test-pre.js"></script> |
| <script src="../resources/gc.js"></script> |
| description("Tests that using Highlight does not cause the document to get leaked."); |
| window.jsTestIsAsync = true; |
| window.onload = function () { |
| async function initAndRemove(frameCount) |
| let frames = await new Promise((resolve, reject) => { |
| if (counter == frameCount) |
| for (let i = 0; i < frameCount; ++i) { |
| let frame = document.createElement('iframe'); |
| frame.src = "resources/highlight-frame.html"; |
| document.body.appendChild(frame); |
| let frameIdentifiers = []; |
| for (let i = 0; i < frameCount; ++i) { |
| frameIdentifiers.push(internals.documentIdentifier(frame.contentDocument)); |
| () => testPassed("Document did not leak"), |
| (error) => testFailed(error.message) |
| <script src="../resources/js-test-post.js"></script> |