Index: third_party/WebKit/LayoutTests/fast/forms/select/option-relayout-modified-text.html |
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/option-relayout-modified-text.html b/third_party/WebKit/LayoutTests/fast/forms/select/option-relayout-modified-text.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..273de025e3270968ee40a1670fa3365f790d707b |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/forms/select/option-relayout-modified-text.html |
@@ -0,0 +1,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> |