Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLFormElement / invalid-form-field.html
blob877b83c0e8fd89e67e28d106674131eb835898cb
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="test">
8 <div id="console"></div>
9 </body>
10 <script>
11 window.jsTestIsAsync = true;
13 var form, input, str;
15 window.onload = function()
17 form = document.body.appendChild(document.createElement("form"));
18 form.id = "form";
20 input = document.createElement("input");
21 input.id = "input";
22 input.setAttribute("form", "form");
23 form.elements.namedItem("input");
25 input = null;
27 gc();
28 setTimeout(step2, 100);
31 function step2()
33 try {
34 str = typeof form['input'].form;
35 } catch(e) {
36 str = 'threw exception';
38 shouldBe("str", "'threw exception'");
39 finishJSTest();
41 </script>
42 </html>