[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.24
[framework/web/webkit-efl.git] / LayoutTests / fast / forms / form-attribute-nonexistence-form-id.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../fast/js/resources/js-test-pre.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;.');
17
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 <script src="../../fast/js/resources/js-test-post.js"></script>
29 </body>
30 </html>