blob: 273de025e3270968ee40a1670fa3365f790d707b [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<p>Pass if the two selects below have the same width.</p>
<select id="ref">
<option>OPTION TEXT</option>
</select>
<br>
<select id="test">
<option></option>
</select>
<script>
description("Modifying text content of an <option> changes the width of the <select>.");
var refSelect = document.querySelector("#ref");
var testSelect = document.querySelector("#test");
shouldBeGreaterThan("refSelect.offsetWidth", "testSelect.offsetWidth");
testSelect.querySelector("option").textContent = "OPTION TEXT";
shouldBe("testSelect.offsetWidth", "refSelect.offsetWidth");
</script>