blob: ff7bb217ea92a1d9d23d33e2dbf4316eeb8c3334 [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 labelWithoutForm = document.getElementById('label1');
var labelWithInvalidForm = document.getElementById('label2');
shouldBe('inputShouldHaveForm.form', 'form');
shouldBeNull('inputShouldNotHaveForm.form');
shouldBeNull('labelWithoutForm.form');
shouldBeNull('labelWithInvalidForm.form');
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>