1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <link rel="stylesheet" href="../../js/resources/js-test-style.css">
5 <script src="../../js/resources/js-test-pre.js"></script>
8 <p id="description"></p>
9 <div id="console"></div>
11 description('Test to see if setting the value attribute updates the value.');
13 var input = document.createElement('input');
16 shouldBe('input.setAttribute("value", "10"); input.value', '"10"');
18 input.setAttribute('min', '0');
19 input.setAttribute('max', '100');
21 debug("rewriting the value attribute should update the value")
22 shouldBe('input.setAttribute("value", "20"); input.value', '"20"');
24 debug("changing the max should effect value")
25 shouldBe('input.setAttribute("max", "10"); input.value', '"10"');
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"');
30 var successfullyParsed = true;
32 <script src="../../js/resources/js-test-post.js"></script>