5 <form id=
"someForm"></form>
6 <input type=
"text" name=
"someName" form=
"someForm">
8 <script src=
"../../resources/js-test.js"></script>
11 description("Tests form.elements is invalidated when input element's form attribute is changed.");
13 var input
= document
.querySelector('input');
15 evalAndLog("collection = document.getElementById('someForm').elements;");
16 shouldBe("collection.length", "1");
17 shouldBe("collection.length; input.setAttribute('form', 'otherForm'); collection.length", "0");
18 shouldBe("collection.length; input.setAttribute('form', 'someForm'); collection.length", "1");
20 container
.style
.display
= 'none';