| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 <p>HTMLSelectElement multiple attribute test when no size is specified</p> | 6 <p>HTMLSelectElement multiple attribute test when no size is specified</p> |
| 7 <div id="console"></div> | 7 <div id="console"></div> |
| 8 | 8 |
| 9 <select multiple id="sel1" > | 9 <select multiple id="sel1" > |
| 10 <option value="1">One</option> | 10 <option value="1">One</option> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 function clientHeight(elemId) { | 42 function clientHeight(elemId) { |
| 43 var element = getElemById(elemId); | 43 var element = getElemById(elemId); |
| 44 return element.clientHeight; | 44 return element.clientHeight; |
| 45 } | 45 } |
| 46 | 46 |
| 47 shouldBe("clientHeight('sel2')", "clientHeight('sel1')"); | 47 shouldBe("clientHeight('sel2')", "clientHeight('sel1')"); |
| 48 shouldBeTrue("getElemById('sel2').setAttribute('size', '5'); clientHeight('s
el2') > clientHeight('sel1')"); | 48 shouldBeTrue("getElemById('sel2').setAttribute('size', '5'); clientHeight('s
el2') > clientHeight('sel1')"); |
| 49 shouldBe("clientHeight('sel3')", "clientHeight('sel1')"); | 49 shouldBe("clientHeight('sel3')", "clientHeight('sel1')"); |
| 50 shouldBe("getElemById('sel3').setAttribute('size', '2'); clientHeight('sel3'
)", "clientHeight('sel1')"); | 50 shouldBeTrue("getElemById('sel3').setAttribute('size', '2'); clientHeight('s
el3') < clientHeight('sel1')"); |
| 51 shouldBe("getElemById('sel3').setAttribute('size', '0'); clientHeight('sel3'
)", "clientHeight('sel1')"); | 51 shouldBe("getElemById('sel3').setAttribute('size', '0'); clientHeight('sel3'
)", "clientHeight('sel1')"); |
| 52 shouldBe("getElemById('sel3').setAttribute('size', ''); clientHeight('sel3')
", "clientHeight('sel1')"); | 52 shouldBe("getElemById('sel3').setAttribute('size', ''); clientHeight('sel3')
", "clientHeight('sel1')"); |
| 53 shouldBe("getElemById('sel3').setAttribute('size', '1+ef'); clientHeight('se
l3')", "clientHeight('sel1')"); | 53 // '1+ef' is recognized as 1. This is compatible with IE and Firefox. |
| 54 shouldBeTrue("getElemById('sel3').setAttribute('size', '1+ef'); clientHeight
('sel3') < clientHeight('sel1')"); |
| 54 </script> | 55 </script> |
| 55 </body> | 56 </body> |
| 56 </html> | 57 </html> |
| OLD | NEW |