Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/select/option-relayout-modified-text.html

Issue 1719873002: Trigger options width update when option text changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698