OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 | 7 |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 description('HTMLInputElement size attribute test'); | 10 description('HTMLInputElement size attribute test'); |
11 | 11 |
12 var input = document.createElement("input"); | 12 var input = document.createElement("input"); |
13 | 13 |
14 shouldBe("input.size", "20"); | 14 shouldBe("input.size", "20"); |
15 | 15 |
16 shouldBe("input.setAttribute('size', '-1'); input.size", "20"); | 16 shouldBe("input.setAttribute('size', '-1'); input.size", "20"); |
17 shouldBe("input.removeAttribute('size'); input.size", "20"); | 17 shouldBe("input.removeAttribute('size'); input.size", "20"); |
18 shouldBe("input.setAttribute('size', '1'); input.size", "1"); | 18 shouldBe("input.setAttribute('size', '1'); input.size", "1"); |
19 shouldBe("input.setAttribute('size', '2'); input.size", "2"); | 19 shouldBe("input.setAttribute('size', '2'); input.size", "2"); |
20 shouldBe("input.removeAttribute('size'); input.size", "20"); | 20 shouldBe("input.removeAttribute('size'); input.size", "20"); |
21 shouldBe("input.setAttribute('size', 'a'); input.size", "20"); | 21 shouldBe("input.setAttribute('size', 'a'); input.size", "20"); |
22 shouldBe("input.removeAttribute('size'); input.size", "20"); | 22 shouldBe("input.removeAttribute('size'); input.size", "20"); |
23 shouldBe("input.setAttribute('size', '0'); input.size", "20"); | 23 shouldBe("input.setAttribute('size', '0'); input.size", "20"); |
24 shouldBe("input.setAttribute('size', '10'); input.size", "10"); | 24 shouldBe("input.setAttribute('size', '10'); input.size", "10"); |
25 | 25 |
26 shouldThrow("input.size = 0", "'IndexSizeError: Index or size was negative, or g
reater than the allowed value.'"); | 26 shouldThrow("input.size = 0", "'IndexSizeError: Index or size was negative, or g
reater than the allowed value.'"); |
27 | 27 |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 | 30 |
31 </body> | 31 </body> |
32 </html> | 32 </html> |
OLD | NEW |