blob: f95eb4b7f0b9a84e1427cd320d2933b41a8a6552 [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.createShadowRoot();
innerFrame = shadowRoot.appendChild(document.createElement("iframe"));
};
document.body.removeChild(container);
shouldBe('innerFrame.contentDocument', 'null');
</script>