Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: LayoutTests/fast/forms/form-associated-element.html

Issue 145353004: Build HTMLFormElement::m_associatedElements lazily (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix crash Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/IdTargetObserverRegistry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/IdTargetObserverRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698