Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / form-attribute-nonexistence-form-id.html
blob8d35891b42dd0d836eb02dd3675b1367d3ccb052
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <form id="form">
9 <input type="hidden" id="input1" value="value1">
10 <input type="hidden" id="input2" value="value2" form="X">
11 <label id="label1">label1</label>
12 <label id="label2" form="X">label2</label>
13 </form>
14 <div id="console"></div>
15 <script>
16 description('This page ensures that &lt;input from="X"&gt; and &lt;label from="X"&gt; don\'t associate with any form elements when there is no &lt;form id="X"&gt;.');
18 var form = document.getElementById('form');
19 var inputShouldHaveForm = document.getElementById('input1');
20 var inputShouldNotHaveForm = document.getElementById('input2');
21 var labelShouldHaveForm = document.getElementById('label1');
22 var labelShouldNotHaveForm = document.getElementById('label2');
23 shouldBe('inputShouldHaveForm.form', 'form');
24 shouldBeNull('inputShouldNotHaveForm.form');
25 shouldBe('labelShouldHaveForm.form', 'form');
26 shouldBeNull('labelShouldNotHaveForm.form');
27 </script>
28 </body>
29 </html>