Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-replace-option.html
blob3eac99694d16d170729fdf0cf903e433ebc2ad34
1 <head>
2 <script>
3 function test()
5 if (window.testRunner)
6 testRunner.dumpAsText();
7 var select = document.getElementById('select');
8 select.options[1] = new Option("Replacement Option 1", "Replacement Option 1");
9 var length = select.options.length;
10 for (var i = 0; i < length; ++i) {
11 var message = "options[" + i + "] is " + select.options[i].innerHTML;
12 var paragraph = document.createElement('div');
13 paragraph.appendChild(document.createTextNode(message));
14 document.getElementById('console').appendChild(paragraph);
16 var message = "selected index is " + select.selectedIndex;
17 var paragraph = document.createElement('p');
18 paragraph.appendChild(document.createTextNode(message));
19 document.getElementById('console').appendChild(paragraph);
21 </script>
22 </head>
23 <body onload="test();">
24 <p>This tests replacing an option using JavaScript. If successful, the options should be "Replacement Option 0", "Option 1", and "Option 2", and selected index should be 0.<form>
25 <form>
26 <select id="select">
27 <option>Option 0</option>
28 <option>Option 1</option>
29 <option>Option 2</option>
30 </select>
31 </form>
32 <p id="console"></p>
33 </body>