OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 | 4 |
5 <fieldset id="f1" disabled> | 5 <fieldset id="f1" disabled> |
6 <input required id="i1"> | 6 <input required id="i1"> |
7 </fieldset> | 7 </fieldset> |
8 <fieldset id="f2"> | 8 <fieldset id="f2"> |
9 <input required id="i2"> | 9 <input required id="i2"> |
10 </fieldset> | 10 </fieldset> |
11 | 11 |
12 <script> | 12 <script> |
13 debug('A form control in initially disabled fieldset:'); | 13 debug('A form control in initially disabled fieldset:'); |
14 var control1 = document.getElementById("i1"); | 14 var control1 = document.getElementById("i1"); |
15 shouldBeFalse('control1.willValidate'); | 15 shouldBeFalse('control1.willValidate'); |
16 debug('Then, enables the fieldset:'); | 16 debug('Then, enables the fieldset:'); |
17 shouldBeTrue('document.getElementById("f1").disabled = false; control1.willValid
ate'); | 17 shouldBeTrue('document.getElementById("f1").disabled = false; control1.willValid
ate'); |
18 | 18 |
19 debug('A form control in initially enabled fieldset:'); | 19 debug('A form control in initially enabled fieldset:'); |
20 var control2 = document.getElementById("i2"); | 20 var control2 = document.getElementById("i2"); |
21 var fieldset2 = document.getElementById("f2"); | 21 var fieldset2 = document.getElementById("f2"); |
22 shouldBeTrue('control2.willValidate'); | 22 shouldBeTrue('control2.willValidate'); |
23 debug('Then, disables fieldset:'); | 23 debug('Then, disables fieldset:'); |
24 shouldBeFalse('fieldset2.disabled = true; control2.willValidate'); | 24 shouldBeFalse('fieldset2.disabled = true; control2.willValidate'); |
25 debug('Detach the form control from the fieldset:'); | 25 debug('Detach the form control from the fieldset:'); |
26 shouldBeTrue('fieldset2.removeChild(control2); control2.willValidate'); | 26 shouldBeTrue('fieldset2.removeChild(control2); control2.willValidate'); |
27 | 27 |
28 </script> | 28 </script> |
29 <script src="../../js/resources/js-test-pre.js"></script> | 29 <script src="../../../resources/js-test.js"></script> |
30 </body> | 30 </body> |
OLD | NEW |