1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
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>
14 <div id=
"console"></div>
16 description('This page ensures that <input from="X"> and <label from="X"> don\'t associate with any form elements when there is no <form id="X">.');
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');