Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / element-by-name.html
blob4bf7eacd851208f5825d3644974b1639e1a1aa72
1 <html>
2 <head>
3 <script>
4 function test()
6 if (window.testRunner)
7 testRunner.dumpAsText();
8 document.getElementById("putElementHere").innerHTML = "<input type='text' name='testElement' value='test element contents'>";
9 document.testForm.testElement.focus();
10 document.getElementById("result").innerText = "Form element was found.";
12 </script>
13 </head>
14 <body onload="test()">
15 <p>This is a regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=3481">bug 3481</a>.
16 The problem is that form elements added via innerHTML were not accessible with the form.elementName syntax.</p>
17 <p>If the test succeeds, there will be a line below that says "form element was found".</p>
18 <hr>
19 <form name="testForm"><p id="putElementHere"></p></form>
20 <hr>
21 <p id="result"></p>
22 </html>