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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select-change-popup-to-listbox-roundtrip.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 <html>
2 <script>
3
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
7 }
8
9 function runTest()
10 {
11 var s1 = document.getElementById("s1");
12 s1.size = 1;
13 s1.size = 5;
14
15 var s2 = document.getElementById("s2");
16 s2.size = 1;
17 // force layout.
18 document.body.offsetTop;
19 s2.size = 5;
20
21 var s3 = document.getElementById("s3");
22 s3.size = 1;
23 setTimeout(function()
24 {
25 s3.size = 5;
26 reportResults();
27 }, 0);
28 }
29
30 function reportResults()
31 {
32 var selected1 = s1.selectedIndex;
33 var selected2 = s2.selectedIndex;
34 var selected3 = s3.selectedIndex;
35 document.getElementById("test").innerHTML = "<ul>" +
36 "<li>Changing the size of a select element from 5 to 1 and back 5 should acquire selection of the first item: " + (selected1 == 0 ? "PASS" : "FAIL") +
37 "<li>Forcing layout should not affect the outcome: " + (selected2 == sel ected1 ? "PASS" : "FAIL") +
38 "<li>And neither should dropping out of the message loop: " + (selected3 == selected1 ? "PASS" : "FAIL") +
39 "</ul>";
40
41 if (window.testRunner)
42 testRunner.notifyDone();
43 }
44
45 </script>
46 <body onload="runTest()">
47 <div id="test">
48 <select id="s1" size="5"><option>test</select>
49 <select id="s2" size="5"><option>test</select>
50 <select id="s3" size="5"><option>test</select>
51 </div>
52 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698