blob: f3477a7931c8b45094a0633ace5c9f60189b28b2 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description('Should not be able to create an iframe with a loaded contentDocument that is not in the document tree.');
container = document.body.appendChild(document.createElement("div"));
helperDiv = container.appendChild(document.createElement("div"));
helperFrame = container.appendChild(document.createElement("iframe"));
helperFrame.contentWindow.onunload = function() {
shadowRoot = helperDiv.attachShadow({mode: 'open'});
innerFrame = shadowRoot.appendChild(document.createElement("iframe"));
};
document.body.removeChild(container);
shouldBe('innerFrame.contentDocument', 'null');
</script>