blob: 7cf46e90d729cd302828d4917ef60ddcf019265b [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<meter id="target" min="0" max="100" value="50" style="-webkit-appearance: none;" />
<script>
(function() {
target = document.getElementById("target");
cloned = target.cloneNode();
document.body.insertBefore(cloned, target.nextSibling);
if (!window.internals) {
debug("You need internals to run this test.");
return;
}
targetShadowRoot = internals.shadowRoot(target);
clonedShadowRoot = internals.shadowRoot(cloned);
targetInnerElement = targetShadowRoot.querySelector("#inner");
clonedInnerElement = clonedShadowRoot.querySelector("#inner");
shouldBe("cloned.value", "target.value");
shouldBe("internals.shadowPseudoId(clonedInnerElement)", "internals.shadowPseudoId(targetInnerElement)");
shouldBe("internals.shadowPseudoId(clonedInnerElement.firstChild)", "internals.shadowPseudoId(targetInnerElement.firstChild)");
shouldBe("internals.shadowPseudoId(clonedInnerElement.firstChild.firstChild)", "internals.shadowPseudoId(targetInnerElement.firstChild.firstChild)");
cloned.value = 70;
shouldBe("clonedInnerElement.firstChild.firstChild.style.width", '"70%"');
shouldBe("targetInnerElement.firstChild.firstChild.style.width", '"50%"');
})();
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>