| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
| 3 <div id="output"></div> | 3 <div id="output"></div> |
| 4 <script> | 4 <script> |
| 5 description("Tests that select elements cap their size to the size attribute
and to 4 when no size is specified."); | 5 description("Tests that select elements cap their size to the size attribute
and to 4 when no size is specified."); |
| 6 | 6 |
| 7 function getElemById(elemId) { | 7 function getElemById(elemId) { |
| 8 return document.getElementById(elemId); | 8 return document.getElementById(elemId); |
| 9 } | 9 } |
| 10 | 10 |
| 11 function clientHeight(elemId) { | 11 function clientHeight(elemId) { |
| 12 return getElemById(elemId).clientHeight; | 12 return getElemById(elemId).clientHeight; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 28 addSelect('select1', 10); | 28 addSelect('select1', 10); |
| 29 addSelect('select2', 16); | 29 addSelect('select2', 16); |
| 30 | 30 |
| 31 shouldBe("clientHeight('select2')", "clientHeight('select1')"); | 31 shouldBe("clientHeight('select2')", "clientHeight('select1')"); |
| 32 shouldBeTrue("getElemById('select2').setAttribute('size', '4'); clientHeight
('select2') == clientHeight('select1')"); | 32 shouldBeTrue("getElemById('select2').setAttribute('size', '4'); clientHeight
('select2') == clientHeight('select1')"); |
| 33 shouldBeTrue("getElemById('select2').setAttribute('size', '5'); clientHeight
('select2') > clientHeight('select1')"); | 33 shouldBeTrue("getElemById('select2').setAttribute('size', '5'); clientHeight
('select2') > clientHeight('select1')"); |
| 34 shouldBeCloseTo("getElemById('select2').setAttribute('size', '8'); clientHei
ght('select2')", multipleOfElement('select1', 2), 1); | 34 shouldBeCloseTo("getElemById('select2').setAttribute('size', '8'); clientHei
ght('select2')", multipleOfElement('select1', 2), 1); |
| 35 shouldBeCloseTo("getElemById('select2').setAttribute('size', '12'); clientHe
ight('select2')", multipleOfElement('select1', 3), 1); | 35 shouldBeCloseTo("getElemById('select2').setAttribute('size', '12'); clientHe
ight('select2')", multipleOfElement('select1', 3), 1); |
| 36 shouldBeCloseTo("getElemById('select2').setAttribute('size', '16'); clientHe
ight('select2')", multipleOfElement('select1', 4), 1); | 36 shouldBeCloseTo("getElemById('select2').setAttribute('size', '16'); clientHe
ight('select2')", multipleOfElement('select1', 4), 1); |
| 37 </script> | 37 </script> |
| OLD | NEW |