blob: 273de025e3270968ee40a1670fa3365f790d707b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!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>
|