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

Side by Side Diff: LayoutTests/fast/forms/submit-form-attributes.html

Issue 59903003: Remove TreatNullAs=NullString for HTMLButtonElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@nullb
Patch Set: update tests Created 7 years, 1 month 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 PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
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 </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 <script> 9 <script>
10 description('Tests the behavior of .formaction, .formenctype, .formmethod and .f ormtarget of HTMLInputElement and HTMLButtonElement.'); 10 description('Tests the behavior of .formaction, .formenctype, .formmethod and .f ormtarget of HTMLInputElement and HTMLButtonElement.');
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 button.formMethod = 'nota'; 145 button.formMethod = 'nota';
146 shouldBeEqualToString('button.formMethod', 'get'); 146 shouldBeEqualToString('button.formMethod', 'get');
147 button.formTarget = 'http://example.com'; 147 button.formTarget = 'http://example.com';
148 shouldBeEqualToString('button.formTarget', 'http://example.com'); 148 shouldBeEqualToString('button.formTarget', 'http://example.com');
149 button.formTarget = 'nota'; 149 button.formTarget = 'nota';
150 shouldBeEqualToString('button.formTarget', 'nota'); 150 shouldBeEqualToString('button.formTarget', 'nota');
151 151
152 debug(''); 152 debug('');
153 debug('Setting null for button:'); 153 debug('Setting null for button:');
154 button.formEnctype = null; 154 button.formEnctype = null;
155 shouldBeEqualToString('button.formEnctype', ''); 155 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ;
156 shouldBe('button.getAttribute("formEnctype")', 'null'); 156 shouldBeEqualToString('button.getAttribute("formEnctype")', 'null');
157 button.setAttribute('formEnctype', null); 157 button.setAttribute('formEnctype', null);
158 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ; 158 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ;
159 button.formMethod = null; 159 button.formMethod = null;
160 shouldBeEqualToString('button.formMethod', ''); 160 shouldBeEqualToString('button.formMethod', 'get');
161 shouldBe('button.getAttribute("formMethod")', 'null'); 161 shouldBeEqualToString('button.getAttribute("formMethod")', 'null');
162 button.setAttribute('formMethod', null); 162 button.setAttribute('formMethod', null);
163 shouldBeEqualToString('button.formMethod', 'get'); 163 shouldBeEqualToString('button.formMethod', 'get');
164 button.formTarget = null; 164 button.formTarget = null;
165 shouldBeEqualToString('button.formTarget', ''); 165 shouldBeEqualToString('button.formTarget', 'null');
166 shouldBe('button.getAttribute("formTarget")', 'null'); 166 shouldBeEqualToString('button.getAttribute("formTarget")', 'null');
167 button.setAttribute('formTarget', null); 167 button.setAttribute('formTarget', null);
168 shouldBeEqualToString('button.formTarget', 'null'); 168 shouldBeEqualToString('button.formTarget', 'null');
169 169
170 debug(''); 170 debug('');
171 debug('Setting undefined for button:'); 171 debug('Setting undefined for button:');
172 button.formEnctype = undefined; 172 button.formEnctype = undefined;
173 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ; 173 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ;
174 shouldBeEqualToString('button.getAttribute("formEnctype")', 'undefined'); 174 shouldBeEqualToString('button.getAttribute("formEnctype")', 'undefined');
175 button.setAttribute('formEnctype', undefined); 175 button.setAttribute('formEnctype', undefined);
176 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ; 176 shouldBeEqualToString('button.formEnctype', 'application/x-www-form-urlencoded') ;
(...skipping 21 matching lines...) Expand all
198 button.setAttribute('formMethod', 17); 198 button.setAttribute('formMethod', 17);
199 shouldBeEqualToString('button.formMethod', 'get'); 199 shouldBeEqualToString('button.formMethod', 'get');
200 button.formTarget = 100; 200 button.formTarget = 100;
201 shouldBeEqualToString('button.formTarget', '100'); 201 shouldBeEqualToString('button.formTarget', '100');
202 shouldBeEqualToString('button.getAttribute("formTarget")', '100'); 202 shouldBeEqualToString('button.getAttribute("formTarget")', '100');
203 button.setAttribute('formTarget', 281); 203 button.setAttribute('formTarget', 281);
204 shouldBeEqualToString('button.formTarget', '281'); 204 shouldBeEqualToString('button.formTarget', '281');
205 </script> 205 </script>
206 </body> 206 </body>
207 </html> 207 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698