blob: cd743b0b236d5f418cf6c4b43e27ef74f36f8a58 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../dom/shadow/resources/polyfill.js"></script>
<script src="../js/resources/js-test-pre.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.webkitCreateShadowRoot();
innerFrame = shadowRoot.appendChild(document.createElement("iframe"));
};
document.body.removeChild(container);
shouldBe('innerFrame.contentDocument', 'null');
</script>
<script src="../js/resources/js-test-post.js"></script>