| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 | 9 |
| 10 <datalist id="list"> | 10 <datalist id="list"> |
| 11 <div id=w> | 11 <div id=w> |
| 12 <input type=text id=e required> | 12 <input type=text id=e required> |
| 13 </div> | 13 </div> |
| 14 <legend> |
| 15 <input id="inLegend" required> |
| 16 </legend> |
| 14 </datalist> | 17 </datalist> |
| 15 | 18 |
| 19 |
| 16 <script> | 20 <script> |
| 17 description('Test for child elements of a datalist element.'); | 21 description('Test for child elements of a datalist element.'); |
| 18 | 22 |
| 19 var e = document.getElementById('e'); | 23 var e = document.getElementById('e'); |
| 20 shouldBeFalse('e.willValidate'); | 24 shouldBeFalse('e.willValidate'); |
| 21 var w = document.getElementById('w'); | 25 var w = document.getElementById('w'); |
| 22 w.parentNode.removeChild(w); | 26 w.parentNode.removeChild(w); |
| 23 shouldBeTrue('e.willValidate'); | 27 shouldBeTrue('e.willValidate'); |
| 24 shouldBe('w.querySelector(":invalid")', 'e'); | 28 shouldBe('w.querySelector(":invalid")', 'e'); |
| 25 e.parentNode.removeChild(e); | 29 e.parentNode.removeChild(e); |
| 26 shouldBeTrue('e.willValidate'); | 30 shouldBeTrue('e.willValidate'); |
| 27 document.body.appendChild(e); | 31 document.body.appendChild(e); |
| 28 shouldBeTrue('e.willValidate'); | 32 shouldBeTrue('e.willValidate'); |
| 29 shouldBe('document.querySelector(":invalid")', 'e'); | 33 shouldBe('document.querySelector(":invalid")', 'e'); |
| 30 | 34 |
| 35 shouldBeFalse('document.getElementById("inLegend").willValidate'); |
| 36 |
| 31 </script> | 37 </script> |
| 32 <script src="../../../fast/js/resources/js-test-post.js"></script> | 38 <script src="../../../fast/js/resources/js-test-post.js"></script> |
| 33 </body> | 39 </body> |
| 34 </html> | 40 </html> |
| OLD | NEW |