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

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

Issue 2000423006: Drop LABEL element from form-associated elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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);
11 if (shouldHaveOwner) 11 if (shouldHaveOwner)
12 shouldBeEqualToString("formOwner", "defined"); 12 shouldBeEqualToString("formOwner", "defined");
13 else 13 else
14 shouldBeEqualToString("formOwner", "not defined"); 14 shouldBeEqualToString("formOwner", "not defined");
15 } 15 }
16 </script> 16 </script>
17 </head> 17 </head>
18 <body> 18 <body>
19 <div style="display: none;"> 19 <div style="display: none;">
20 <form id=topForm> 20 <form id=topForm>
21 <label form=topForm onerror="" onclick="hasFormOwner(true, typeof canary !== 'un defined' && canary, event);"><input type="button"/></label> 21 <label form=topForm onerror="" onclick="hasFormOwner(false, typeof canary !== 'u ndefined' && canary, event);"><input type="button"/></label>
22 <!-- Form-associated elements per http://whatwg.org/specs/web-apps/current-work/ #form-associated-element --> 22 <!-- Form-associated elements per http://whatwg.org/specs/web-apps/current-work/ #form-associated-element -->
23 <button onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></button> 23 <button onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></button>
24 <fieldset onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, e vent);"></fieldset> 24 <fieldset onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, e vent);"></fieldset>
25 <input type=radio onerror="hasFormOwner(true, typeof canary !== 'undefined' && c anary, event);"/> 25 <input type=radio onerror="hasFormOwner(true, typeof canary !== 'undefined' && c anary, event);"/>
26 <input type=number onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event);"/> 26 <input type=number onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event);"/>
27 <keygen keytype=rsa onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event);"></keygen> 27 <keygen keytype=rsa onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event);"></keygen>
28 <label onerror="" onclick="hasFormOwner(true, typeof canary !== 'undefined' && c anary, event);"><input type="button"/></label> 28 <label onerror="" onclick="hasFormOwner(false, typeof canary !== 'undefined' && canary, event);"><input type="button"/></label>
29 <object onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></object> 29 <object onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></object>
30 <select onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></select> 30 <select onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, eve nt);"></select>
31 <textarea onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, e vent);"></textarea> 31 <textarea onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, e vent);"></textarea>
32 <img onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event) ;"></img> 32 <img onerror="hasFormOwner(true, typeof canary !== 'undefined' && canary, event) ;"></img>
33 33
34 <!-- Elements that aren't associated. --> 34 <!-- Elements that aren't associated. -->
35 <option onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, ev ent);"></option> 35 <option onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, ev ent);"></option>
36 <div onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event );"></div> 36 <div onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event );"></div>
37 <a onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event); "></a> 37 <a onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event); "></a>
38 <p onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event); "></p> 38 <p onerror="hasFormOwner(false, typeof canary !== 'undefined' && canary, event); "></p>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 debug("Association-by-parser should not work for non-Document trees"); 93 debug("Association-by-parser should not work for non-Document trees");
94 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>";
95 shouldBeUndefined("removed.querySelector('form')['image4']"); 95 shouldBeUndefined("removed.querySelector('form')['image4']");
96 shouldBeNull("removed.querySelector('input').form"); 96 shouldBeNull("removed.querySelector('input').form");
97 shouldBeNull("removed.querySelector('object').form"); 97 shouldBeNull("removed.querySelector('object').form");
98 98
99 </script> 99 </script>
100 </body> 100 </body>
101 </html> 101 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698