Git init
[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 <link rel="stylesheet" href="../../js/resources/js-test-style.css">
5 <script src="../../js/resources/js-test-pre.js"></script>
6 </head>
7 <body>
8 <p id="description"></p>
9 <div id="console"></div>
10 <script>
11 description('Test to see if setting the value attribute updates the value.');
12
13 var input = document.createElement('input');
14 input.type = 'range';
15
16 shouldBe('input.setAttribute("value", "10"); input.value', '"10"');
17
18 input.setAttribute('min', '0');
19 input.setAttribute('max', '100');
20
21 debug("rewriting the value attribute should update the value")
22 shouldBe('input.setAttribute("value", "20"); input.value', '"20"');
23
24 debug("changing the max should effect value")
25 shouldBe('input.setAttribute("max", "10"); input.value', '"10"');
26
27 debug("value attribute should not change the value after you set a value")
28 shouldBe('input.value = 10; input.setAttribute("value", "5"); input.value', '"10"');
29
30 var successfullyParsed = true;
31 </script>
32 <script src="../../js/resources/js-test-post.js"></script>
33 </body>
34 </html>