1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../js/resources/js-test-pre.js"></script>
7 <p id="description"></p>
8 <div id="console"></div>
10 description('Test to see if setting the value attribute updates the value.');
12 var input = document.createElement('input');
15 shouldBe('input.setAttribute("value", "10"); input.value', '"10"');
17 input.setAttribute('min', '0');
18 input.setAttribute('max', '100');
20 debug("rewriting the value attribute should update the value")
21 shouldBe('input.setAttribute("value", "20"); input.value', '"20"');
23 debug("changing the max should effect value")
24 shouldBe('input.setAttribute("max", "10"); input.value', '"10"');
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"');
29 <script src="../../js/resources/js-test-post.js"></script>