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

Side by Side 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 unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698