<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p>
Tests that a range input's slider is cloned along with its host. There
should be a second range input in the document and it should have a
slider positioned at zero.
</p>
<input type="range" id="sheep" style="display: block; width: 100px;">
<div id="console"></div>
<script>
var sheep = document.querySelector('#sheep');
var dolly = sheep.cloneNode();
sheep.insertAdjacentElement('afterEnd', dolly);
// Cloned element should be the same size. Having zero height is one
// symptom of a broken clone.
shouldBe('dolly.clientHeight', 'sheep.clientHeight');
if (window.internals) {
var sheepShadow = internals.shadowRoot(sheep);
var dollyShadow = internals.shadowRoot(dolly);
shouldBe('internals.shadowPseudoId(dollyShadow.firstChild)',
'internals.shadowPseudoId(sheepShadow.firstChild)');
}
dolly.value = 0;
</script>
</body>
</html>