blob: b55147781e95d3011be190d2e4d6f23e9cc65e3a [file] [log] [blame]
x+<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This test ensure that the shadow related elements are instantiated even inside frameless documents.");
var doc = document.implementation.createHTMLDocument();
var container = doc.createElement("span");
doc.body.appendChild(container);
container.innerHTML = "<content id='contentElement'></content><shadow id='shadowElement'></shadow>";
var content = container.querySelector("#contentElement");
var shadow = container.querySelector("#shadowElement");
debug("Testing on the frame-less document.");
shouldBe("window.HTMLContentElement", "content.constructor");
shouldBe("window.HTMLShadowElement", "shadow.constructor");
debug("Moving to the main document.");
document.body.appendChild(container);
shouldBe("window.HTMLContentElement", "content.constructor");
shouldBe("window.HTMLShadowElement", "shadow.constructor");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>