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="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 description('Tests the behavior of .min and .max of HTMLInputElement.'); | 10 description('Tests the behavior of .min and .max of HTMLInputElement.'); |
(...skipping 18 matching lines...) Expand all Loading... |
29 shouldBe('input.getAttribute("min")', '"foo"'); | 29 shouldBe('input.getAttribute("min")', '"foo"'); |
30 shouldBe('input.getAttribute("max")', '"bar"'); | 30 shouldBe('input.getAttribute("max")', '"bar"'); |
31 input.min = ''; | 31 input.min = ''; |
32 input.max = ''; | 32 input.max = ''; |
33 shouldBe('input.getAttribute("min")', '""'); | 33 shouldBe('input.getAttribute("min")', '""'); |
34 shouldBe('input.getAttribute("max")', '""'); | 34 shouldBe('input.getAttribute("max")', '""'); |
35 | 35 |
36 // Null. | 36 // Null. |
37 debug('Setting null to min:'); | 37 debug('Setting null to min:'); |
38 input.min = null; | 38 input.min = null; |
39 shouldBe('input.min', '""'); | 39 shouldBe('input.min', '"null"'); |
40 shouldBe('input.getAttribute("min")', 'null'); | 40 shouldBe('input.getAttribute("min")', '"null"'); |
41 input.setAttribute('min', null); | 41 input.setAttribute('min', null); |
42 shouldBe('input.min', '"null"'); | 42 shouldBe('input.min', '"null"'); |
43 | 43 |
44 debug('Setting null to max:'); | 44 debug('Setting null to max:'); |
45 input.max = null; | 45 input.max = null; |
46 shouldBe('input.max', '""'); | 46 shouldBe('input.max', '"null"'); |
47 shouldBe('input.getAttribute("max")', 'null'); | 47 shouldBe('input.getAttribute("max")', '"null"'); |
48 input.setAttribute('max', null); | 48 input.setAttribute('max', null); |
49 shouldBe('input.max', '"null"'); | 49 shouldBe('input.max', '"null"'); |
50 | 50 |
51 // Undefined. | 51 // Undefined. |
52 debug('Setting undefined to min:'); | 52 debug('Setting undefined to min:'); |
53 input.min = undefined; | 53 input.min = undefined; |
54 shouldBe('input.min', '"undefined"'); | 54 shouldBe('input.min', '"undefined"'); |
55 shouldBe('input.getAttribute("min")', '"undefined"'); | 55 shouldBe('input.getAttribute("min")', '"undefined"'); |
56 input.setAttribute('min', undefined); | 56 input.setAttribute('min', undefined); |
57 shouldBe('input.min', '"undefined"'); | 57 shouldBe('input.min', '"undefined"'); |
(...skipping 24 matching lines...) Expand all Loading... |
82 // But they aren't exposed by .min .max IDL attributes. | 82 // But they aren't exposed by .min .max IDL attributes. |
83 debug('Check implicit min/max of type=range:'); | 83 debug('Check implicit min/max of type=range:'); |
84 input.type = 'range'; | 84 input.type = 'range'; |
85 input.setAttribute('min', ''); | 85 input.setAttribute('min', ''); |
86 input.setAttribute('max', ''); | 86 input.setAttribute('max', ''); |
87 shouldBe('input.min', '""'); | 87 shouldBe('input.min', '""'); |
88 shouldBe('input.max', '""'); | 88 shouldBe('input.max', '""'); |
89 </script> | 89 </script> |
90 </body> | 90 </body> |
91 </html> | 91 </html> |
OLD | NEW |