summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/multiple-ids.html
blob: a43604fe30ffda263003d473d4e6d4966ba63d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

function doTest() {

    result = document.getElementById("result");

    document.getElementById('labo').innerHTML = "<form><select name='labo' id='labo'><option>1</option><option>2</option></select><form>";
    sel = document.getElementById("labo");
    result.innerHTML += ("1. Found " + sel + " (should be a div element)\n");

    document.getElementById('labo2').innerHTML = "<span id='labo2'></<span>";
    sel = document.getElementById("labo2");
    result.innerHTML += ("2. Found " + sel + " (should be a div element)\n");

    sel = document.getElementById("labo3");
    result.innerHTML += ("3. Found " + sel + " (should be a div element)\n");

    sel = document.getElementById("labo4");
    result.innerHTML += ("4. Found " + sel + " (should be a div element)\n");
}

</script>
</head>
<body onload="doTest()">
<div id='labo'></div>
<div id='labo2'></div>
<div id='labo3'><form><select name='labo3' id='labo3'><option>1</option><option>2</option></select><form></div>
<div id='labo4'><span name='labo4' id='labo4'></span></div>

<pre id="result"></pre>
</body>