| <!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 <input from="X"> and <label from="X"> don\'t associate with any form elements when there is no <form id="X">.'); |
| |
| 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> |