Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / disabled-select-change-index.html
blob2ef29275522ad7a82de57f4211a0deea98954380
1 <select id="sel1" disabled="disabled">
2 <option selected="selected">FAIL</option>
3 <option>PASS</option>
4 </select><br>
5 <select id="sel2" disabled="disabled">
6 <option selected="selected">FAIL</option>
7 <option>PASS</option>
8 </select><br>
10 <select id="sel3">
11 <option selected="selected">FAIL</option>
12 <option disabled="disabled">PASS</option>
13 </select><br>
14 <select id="sel4">
15 <option selected="selected">FAIL</option>
16 <option disabled="disabled">PASS</option>
17 </select><br>
19 <select id="sel5" size="2" disabled="disabled">
20 <option selected="selected">FAIL</option>
21 <option>PASS</option>
22 </select><br>
23 <select id="sel6" size="2" disabled="disabled">
24 <option selected="selected">FAIL</option>
25 <option>PASS</option>
26 </select><br>
28 <select id="sel7" size="2">
29 <option selected="selected">FAIL</option>
30 <option disabled="disabled">PASS</option>
31 </select><br>
32 <select id="sel8" size="2">
33 <option selected="selected">FAIL</option>
34 <option disabled="disabled">PASS</option>
35 </select><br>
38 <script>
40 var sel1 = document.getElementById("sel1");
41 sel1.options[1].selected = true;
43 if (sel1.selectedIndex == 1)
44 document.write("PASS: sel1 correctly set to selectedIndex 1 by sel1.options[1].selected = true.<br>");
45 else
46 document.write("FAIL: sel1 set to selectedIndex " + sel1.selectedIndex + " instead of 1 by sel1.options[1].selected = true.<br>");
48 var sel2 = document.getElementById("sel2");
49 sel2.selectedIndex = 1;
51 if (sel2.selectedIndex == 1)
52 document.write("PASS: sel2 correctly set to selectedIndex 1 by sel2.selectedIndex = 1.<br>");
53 else
54 document.write("FAIL: sel2 set to selectedIndex " + sel2.selectedIndex + " instead of 1 by sel2.selectedIndex = 1.<br>");
56 var sel3 = document.getElementById("sel3");
57 sel3.options[1].selected = true;
59 if (sel3.selectedIndex == 1)
60 document.write("PASS: sel3 correctly set to selectedIndex 1 by sel3.options[1].selected = true.<br>");
61 else
62 document.write("FAIL: sel3 set to selectedIndex " + sel3.selectedIndex + " instead of 1 by sel3.options[1].selected = true.<br>");
64 var sel4 = document.getElementById("sel4");
65 sel4.selectedIndex = 1;
67 if (sel4.selectedIndex == 1)
68 document.write("PASS: sel4 correctly set to selectedIndex 1 by sel4.selectedIndex = 1.<br>");
69 else
70 document.write("FAIL: sel4 set to selectedIndex " + sel4.selectedIndex + " instead of 1 by sel4.selectedIndex = 1.<br>");
73 var sel5 = document.getElementById("sel5");
74 sel5.options[1].selected = true;
76 if (sel5.selectedIndex == 1)
77 document.write("PASS: sel5 correctly set to selectedIndex 1 by sel5.options[1].selected = true.<br>");
78 else
79 document.write("FAIL: sel5 set to selectedIndex " + sel5.selectedIndex + " instead of 1 by sel5.options[1].selected = true.<br>");
81 var sel6 = document.getElementById("sel6");
82 sel6.selectedIndex = 1;
84 if (sel6.selectedIndex == 1)
85 document.write("PASS: sel6 correctly set to selectedIndex 1 by sel6.selectedIndex = 1.<br>");
86 else
87 document.write("FAIL: sel6 set to selectedIndex " + sel6.selectedIndex + " instead of 1 by sel6.selectedIndex = 1.<br>");
89 var sel7 = document.getElementById("sel7");
90 sel7.options[1].selected = true;
92 if (sel7.selectedIndex == 1)
93 document.write("PASS: sel7 correctly set to selectedIndex 1 by sel7.options[1].selected = true.<br>");
94 else
95 document.write("FAIL: sel7 set to selectedIndex " + sel7.selectedIndex + " instead of 1 by sel7.options[1].selected = true.<br>");
97 var sel8 = document.getElementById("sel8");
98 sel8.selectedIndex = 1;
100 if (sel8.selectedIndex == 1)
101 document.write("PASS: sel8 correctly set to selectedIndex 1 by sel8.selectedIndex = 1.<br>");
102 else
103 document.write("FAIL: sel8 set to selectedIndex " + sel8.selectedIndex + " instead of 1 by sel8.selectedIndex = 1.<br>");
105 </script>