Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-namedItem.html
blobd0fd23364868e9d745c479f9342117d111ee604a
1 <html>
2 <head>
3 <script>
4 function print(message, color)
6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace";
9 if (color)
10 paragraph.style.color = color;
11 document.getElementById("console").appendChild(paragraph);
14 function test()
17 var selects = document.getElementsByTagName('select');
18 for (var i = 0; i < selects.length; i++) { // >
19 try {
20 var item = document.getElementsByTagName('select')[i].namedItem('name1');
21 if (item.innerHTML)
22 print("FOUND ITEM: " + item.innerHTML);
23 else
24 print("NO ITEM: namedItem returned" + item);
25 } catch (e) {
26 print("ERROR: " + e.message);
29 if (window.testRunner)
30 testRunner.dumpAsText();
32 </script>
33 <title>Test for HTMLSelectElement.namedItem()</title>
34 </head>
36 <body onload="test();">
38 <hr>
39 <div id='console'>
40 <H3>Test for HTMLSelectElement.namedItem()</H3>
41 </div>
43 <div style="visibility: hidden">
44 <select>
45 <option name="name1">1</option>
46 <option id="name1">2</option>
47 </select>
49 <select>
50 <option id="name1">1</option>
51 <option name="name1">2</option>
52 </select>
54 <select>
55 <option name="name1">1</option>
56 <option name="name1">2</option>
57 </select>
59 <select>
60 <option id="name1">1</option>
61 <option id="name1">2</option>
62 </select>
64 <select name="name1">
65 <option id="name2">1</option>
66 <option id="name3">2</option>
67 </select>
69 </div>
71 </body>
72 </html>