blob: 20ff42d8c5bd0f9c5507781b41ca87afdfb717c5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<form id="form">
<input type="hidden" id="input1" value="value1">
<input type="hidden" id="input2" value="value2" form="X">
<label id="label1">label1</label>
<label id="label2" form="X">label2</label>
</form>
<div id="console"></div>
<script>
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;.');
var form = document.getElementById('form');
var inputShouldHaveForm = document.getElementById('input1');
var inputShouldNotHaveForm = document.getElementById('input2');
var labelShouldHaveForm = document.getElementById('label1');
var labelShouldNotHaveForm = document.getElementById('label2');
shouldBe('inputShouldHaveForm.form', 'form');
shouldBeNull('inputShouldNotHaveForm.form');
shouldBe('labelShouldHaveForm.form', 'form');
shouldBeNull('labelShouldNotHaveForm.form');
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>