| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
| 6 var formOwner; | 6 var formOwner; |
| 7 function hasFormOwner(shouldHaveOwner, haveIt, event) | 7 function hasFormOwner(shouldHaveOwner, haveIt, event) |
| 8 { | 8 { |
| 9 formOwner = haveIt || "not defined"; | 9 formOwner = haveIt || "not defined"; |
| 10 debug("Testing " + event.target.tagName); | 10 debug("Testing " + event.target.tagName); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 <span form=topForm onerror="hasFormOwner(false, typeof canary !== 'undefined' &&
canary, event);"></span> | 47 <span form=topForm onerror="hasFormOwner(false, typeof canary !== 'undefined' &&
canary, event);"></span> |
| 48 <img form=topForm onerror="hasFormOwner(false, typeof canary !== 'undefined' &&
canary, event);"></img> | 48 <img form=topForm onerror="hasFormOwner(false, typeof canary !== 'undefined' &&
canary, event);"></img> |
| 49 | 49 |
| 50 <!-- Elements associated to a unclosed <form> by the HTML parser --> | 50 <!-- Elements associated to a unclosed <form> by the HTML parser --> |
| 51 <div id="willBeRemoved"> | 51 <div id="willBeRemoved"> |
| 52 <div><form id="form2"></div> | 52 <div><form id="form2"></div> |
| 53 <input name="input1"> | 53 <input name="input1"> |
| 54 <img name="image1"> | 54 <img name="image1"> |
| 55 </div> | 55 </div> |
| 56 <input name="input-in-document"> | 56 <input name="input-in-document"> |
| 57 <select name="select-in-document"></select> |
| 57 <img name="image-in-document"> | 58 <img name="image-in-document"> |
| 58 | 59 |
| 59 </div> | 60 </div> |
| 60 <script> | 61 <script> |
| 61 description("Verify that only elements that are 'form associatable' get a form o
wner."); | 62 description("Verify that only elements that are 'form associatable' get a form o
wner."); |
| 62 | 63 |
| 63 var elements; | 64 var elements; |
| 64 function testFormAssociation() | 65 function testFormAssociation() |
| 65 { | 66 { |
| 66 document.forms[0].canary = "defined"; | 67 document.forms[0].canary = "defined"; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 91 | 92 |
| 92 debug("Association-by-parser should not work for non-Document trees"); | 93 debug("Association-by-parser should not work for non-Document trees"); |
| 93 removed.innerHTML = "<table><form><tr><td><input><object></object><img name='ima
ge4'></td></tr></form>"; | 94 removed.innerHTML = "<table><form><tr><td><input><object></object><img name='ima
ge4'></td></tr></form>"; |
| 94 shouldBeUndefined("removed.querySelector('form')['image4']"); | 95 shouldBeUndefined("removed.querySelector('form')['image4']"); |
| 95 shouldBeNull("removed.querySelector('input').form"); | 96 shouldBeNull("removed.querySelector('input').form"); |
| 96 shouldBeNull("removed.querySelector('object').form"); | 97 shouldBeNull("removed.querySelector('object').form"); |
| 97 | 98 |
| 98 </script> | 99 </script> |
| 99 </body> | 100 </body> |
| 100 </html> | 101 </html> |
| OLD | NEW |