OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <p>Pass if the two selects below have the same width.</p> |
| 4 <select id="ref"> |
| 5 <option>OPTION TEXT</option> |
| 6 </select> |
| 7 <br> |
| 8 <select id="test"> |
| 9 <option></option> |
| 10 </select> |
| 11 <script> |
| 12 description("Modifying text content of an <option> changes the width of the <sel
ect>."); |
| 13 |
| 14 var refSelect = document.querySelector("#ref"); |
| 15 var testSelect = document.querySelector("#test"); |
| 16 |
| 17 shouldBeGreaterThan("refSelect.offsetWidth", "testSelect.offsetWidth"); |
| 18 |
| 19 testSelect.querySelector("option").textContent = "OPTION TEXT"; |
| 20 |
| 21 shouldBe("testSelect.offsetWidth", "refSelect.offsetWidth"); |
| 22 </script> |
OLD | NEW |