tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / forms / range / range-set-attribute.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description('Test to see if setting the value attribute updates the value.');
11
12 var input = document.createElement('input');
13 input.type = 'range';
14
15 shouldBe('input.setAttribute("value", "10"); input.value', '"10"');
16
17 input.setAttribute('min', '0');
18 input.setAttribute('max', '100');
19
20 debug("rewriting the value attribute should update the value")
21 shouldBe('input.setAttribute("value", "20"); input.value', '"20"');
22
23 debug("changing the max should effect value")
24 shouldBe('input.setAttribute("max", "10"); input.value', '"10"');
25
26 debug("value attribute should not change the value after you set a value")
27 shouldBe('input.value = 10; input.setAttribute("value", "5"); input.value', '"10"');
28 </script>
29 <script src="../../js/resources/js-test-post.js"></script>
30 </body>
31 </html>