Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLProgressElement / progress-clone.html
blob3aebbb881dc01caabc4e18616d47212e145b4b0d
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <progress id="target" min="0" max="100" value="50" style="-webkit-appearance: none;" ></progress>
7 <script>
8 (function() {
9 target = document.getElementById("target");
10 cloned = target.cloneNode();
11 document.body.insertBefore(cloned, target.nextSibling);
13 if (!window.internals) {
14 debug("You need internals to run this test.");
15 return;
18 targetShadowRoot = internals.shadowRoot(target);
19 clonedShadowRoot = internals.shadowRoot(cloned);
21 shouldBe("cloned.value", "target.value");
22 shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild)");
23 shouldBe("internals.shadowPseudoId(clonedShadowRoot.firstChild.firstChild.firstChild)", "internals.shadowPseudoId(targetShadowRoot.firstChild.firstChild.firstChild)");
25 cloned.value = 70;
26 shouldBe("clonedShadowRoot.firstChild.firstChild.firstChild.style.width", '"70%"');
27 shouldBe("targetShadowRoot.firstChild.firstChild.firstChild.style.width", '"50%"');
29 })();
30 </script>
31 </body>
32 </html>