tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / html / clone-range.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p>
8 Tests that a range input's slider is cloned along with its host. There
9 should be a second range input in the document and it should have a
10 slider positioned at zero.
11 </p>
12 <input type="range" id="sheep" style="display: block; width: 100px;">
13 <div id="console"></div>
14 <script>
15 var sheep = document.querySelector('#sheep');
16 var dolly = sheep.cloneNode();
17
18 sheep.insertAdjacentElement('afterEnd', dolly);
19
20 // Cloned element should be the same size. Having zero height is one
21 // symptom of a broken clone.
22 shouldBe('dolly.clientHeight', 'sheep.clientHeight');
23
24 if (window.internals) {
25     var sheepShadow = internals.shadowRoot(sheep);
26     var dollyShadow = internals.shadowRoot(dolly);
27     shouldBe('internals.shadowPseudoId(dollyShadow.firstChild)',
28              'internals.shadowPseudoId(sheepShadow.firstChild)');
29 }
30
31 dolly.value = 0;
32 </script>
33 <script src="../js/resources/js-test-post.js"></script>
34 </body>
35 </html>