Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-initial-position.html
blob7e24851b603e3841d6b4f9e0210238f362f887c5
1 <html>
3 <body>
4 initial selected:<br>
5 <select name="component" size="4">
6 <option>opt</option>
7 <option>opt</option>
8 <option>opt</option>
9 <option>opt</option>
10 <option>opt</option>
11 <option>opt</option>
12 <option>opt</option>
13 <option>opt</option>
14 <option>opt</option>
15 <option>opt</option>
16 <option selected=selected>this should be selected</option>
17 <option>opt</option>
18 <option>opt</option>
19 <option>opt</option>
20 </select>
21 <br>
22 dynamic selected change:<br>
23 <select size="4">
24 <option>opt</option>
25 <option>opt</option>
26 <option>opt</option>
27 <option>opt</option>
28 <option>opt</option>
29 <option>opt</option>
30 <option>opt</option>
31 <option>opt</option>
32 <option>opt</option>
33 <option>opt</option>
34 <option id='x'>this should be selected</option>
35 <option>opt</option>
36 <option>opt</option>
37 <option>opt</option>
38 </select>
39 <script>
40 document.getElementById('x').selected = 'selected';
41 </script>
42 <br>
43 dynamic insert of selected option:<br>
44 <script>
45 var sel = document.createElement('select');
46 sel.setAttribute('size','4');
47 document.body.appendChild(sel);
48 var opt = document.createElement('option')
49 opt.innerHTML = 'opt';
50 sel.appendChild(opt);
51 opt = document.createElement('option')
52 opt.innerHTML = 'opt';
53 sel.appendChild(opt);
54 opt = document.createElement('option')
55 opt.innerHTML = 'opt';
56 sel.appendChild(opt);
57 opt = document.createElement('option')
58 opt.innerHTML = 'opt';
59 sel.appendChild(opt);
60 opt = document.createElement('option')
61 opt.innerHTML = 'opt';
62 sel.appendChild(opt);
63 opt = document.createElement('option')
64 opt.innerHTML = 'opt';
65 sel.appendChild(opt);
66 opt = document.createElement('option')
67 opt.innerHTML = 'this should be selected';
68 opt.selected = 'selected';
69 sel.appendChild(opt);
70 opt = document.createElement('option')
71 opt.innerHTML = 'opt';
72 sel.appendChild(opt);
73 </script>
74 <br>
75 initial selected:<br>
76 <select name="component" size="1">
77 <option>opt</option>
78 <option>opt</option>
79 <option>opt</option>
80 <option>opt</option>
81 <option>opt</option>
82 <option>opt</option>
83 <option>opt</option>
84 <option>opt</option>
85 <option>opt</option>
86 <option>opt</option>
87 <option selected=selected>this should be selected</option>
88 <option>opt</option>
89 <option>opt</option>
90 <option>opt</option>
91 </select>
92 <br>
93 dynamic selected change:<br>
94 <select size="1">
95 <option>opt</option>
96 <option>opt</option>
97 <option>opt</option>
98 <option>opt</option>
99 <option>opt</option>
100 <option>opt</option>
101 <option>opt</option>
102 <option>opt</option>
103 <option>opt</option>
104 <option>opt</option>
105 <option id='xx'>this should be selected</option>
106 <option>opt</option>
107 <option>opt</option>
108 <option>opt</option>
109 </select>
110 <script>
111 document.getElementById('xx').selected = 'selected';
112 </script>
113 <br>
114 dynamic insert of selected option:<br>
115 <script>
116 var sel = document.createElement('select');
117 sel.setAttribute('size','1');
118 document.body.appendChild(sel);
119 var opt = document.createElement('option')
120 opt.innerHTML = 'opt';
121 sel.appendChild(opt);
122 opt = document.createElement('option')
123 opt.innerHTML = 'opt';
124 sel.appendChild(opt);
125 opt = document.createElement('option')
126 opt.innerHTML = 'opt';
127 sel.appendChild(opt);
128 opt = document.createElement('option')
129 opt.innerHTML = 'opt';
130 sel.appendChild(opt);
131 opt = document.createElement('option')
132 opt.innerHTML = 'opt';
133 sel.appendChild(opt);
134 opt = document.createElement('option')
135 opt.innerHTML = 'opt';
136 sel.appendChild(opt);
137 opt = document.createElement('option')
138 opt.innerHTML = 'this should be selected';
139 opt.selected = 'selected';
140 sel.appendChild(opt);
141 opt = document.createElement('option')
142 opt.innerHTML = 'opt';
143 sel.appendChild(opt);
144 </script>
146 </body>
148 </html>