This test examines the order of the elements attribute of a form element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
- Test for the case where some elements are outside of the form.
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for changing the value of the form attribute of a element which is located before the form owner.
PASS owner.elements.length is 5
PASS owner.elements[0] is before1
PASS owner.elements[1] is inner1
PASS owner.elements[2] is inner2
PASS owner.elements[3] is after1
PASS owner.elements[4] is after2
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for changing the value of the form attribute of a element which is located inside of the form owner.
PASS owner.elements.length is 5
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is after1
PASS owner.elements[4] is after2
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for changing the value of the form attribute of a element which is located after the form owner.
PASS owner.elements.length is 5
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after2
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for setting form attribute of elements in reverse order.
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for setting form attribute of elements in random order.
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
- Test for removing/adding elements
PASS owner.elements.length is 3
PASS owner.elements[0] is before1
PASS owner.elements[1] is inner1
PASS owner.elements[2] is after2
PASS owner.elements.length is 6
PASS owner.elements[0] is before1
PASS owner.elements[1] is before2
PASS owner.elements[2] is inner1
PASS owner.elements[3] is inner2
PASS owner.elements[4] is after1
PASS owner.elements[5] is after2
PASS successfullyParsed is true
TEST COMPLETE