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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/listbox-clear-restore.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 <!DOCTYPE>
2 <html>
3 <body onload="test()">
4 <select id="myList" size="10" multiple></select>
5 <script>
6 function populateList()
7 {
8 var myList = document.getElementById("myList");
9 var item;
10
11 for (var ii = 0; ii < 20; ii++) {
12 item = document.createElement("option");
13 item.value = ii;
14 item.appendChild(document.createTextNode("Item #" + ii));
15 myList.appendChild(item);
16 }
17 }
18
19 function clearList()
20 {
21 var myList = document.getElementById("myList");
22 var items = myList.getElementsByTagName("option");
23
24 for (var ii = items.length-1; ii >= 0; ii--) {
25 myList.removeChild(items[ii]);
26 }
27 }
28
29 function test()
30 {
31 if (window.testRunner)
32 testRunner.waitUntilDone();
33
34 populateList();
35 document.getElementById("myList").selectedIndex = 19;
36 document.body.offsetWidth; // Force a layout.
37 clearList();
38 document.body.offsetWidth; // Force a layout.
39 populateList();
40
41 if (window.testRunner)
42 testRunner.notifyDone();
43 }
44 </script>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698