<html>
<head>
<script src="../../../resources/js-test.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);
shouldBe("cloned.value", "target.value");
shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild)");
shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild.firstChild)");
cloned.value = 70;
shouldBe("clonedShadowRoot.firstChild.firstChild.firstChild.style.inlineSize", '"70%"');
shouldBe("targetShadowRoot.firstChild.firstChild.firstChild.style.inlineSize", '"50%"');
})();
</script>
</body>
</html>