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

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

Issue 98383004: Remove TreatNullAs=NullString for HTMLInputElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 input.formMethod = 'neta'; 48 input.formMethod = 'neta';
49 shouldBeEqualToString('input.formMethod', 'get'); 49 shouldBeEqualToString('input.formMethod', 'get');
50 input.formTarget = 'http://example.com'; 50 input.formTarget = 'http://example.com';
51 shouldBeEqualToString('input.formTarget', 'http://example.com'); 51 shouldBeEqualToString('input.formTarget', 'http://example.com');
52 input.formTarget = 'nta'; 52 input.formTarget = 'nta';
53 shouldBeEqualToString('input.formTarget', 'nta'); 53 shouldBeEqualToString('input.formTarget', 'nta');
54 54
55 debug(''); 55 debug('');
56 debug('Setting null for input:'); 56 debug('Setting null for input:');
57 input.formEnctype = null; 57 input.formEnctype = null;
58 shouldBeEqualToString('input.formEnctype', ''); 58 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded');
59 shouldBe('input.getAttribute("formEnctype")', 'null'); 59 shouldBeEqualToString('input.getAttribute("formEnctype")', 'null');
60 input.setAttribute('formEnctype', null); 60 input.setAttribute('formEnctype', null);
61 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded'); 61 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded');
62 input.formMethod = null; 62 input.formMethod = null;
63 shouldBeEqualToString('input.formMethod', ''); 63 shouldBeEqualToString('input.formMethod', 'get');
64 shouldBe('input.getAttribute("formMethod")', 'null'); 64 shouldBeEqualToString('input.getAttribute("formMethod")', 'null');
65 input.setAttribute('formMethod', null); 65 input.setAttribute('formMethod', null);
66 shouldBeEqualToString('input.formMethod', 'get'); 66 shouldBeEqualToString('input.formMethod', 'get');
67 input.formTarget = null; 67 input.formTarget = null;
68 shouldBeEqualToString('input.formTarget', ''); 68 shouldBeEqualToString('input.formTarget', 'null');
69 shouldBe('input.getAttribute("formTarget")', 'null'); 69 shouldBeEqualToString('input.getAttribute("formTarget")', 'null');
70 input.setAttribute('formTarget', null); 70 input.setAttribute('formTarget', null);
71 shouldBeEqualToString('input.formTarget', 'null'); 71 shouldBeEqualToString('input.formTarget', 'null');
72 72
73 debug(''); 73 debug('');
74 debug('Setting undefined for input:'); 74 debug('Setting undefined for input:');
75 input.formEnctype = undefined; 75 input.formEnctype = undefined;
76 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded'); 76 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded');
77 shouldBeEqualToString('input.getAttribute("formEnctype")', 'undefined'); 77 shouldBeEqualToString('input.getAttribute("formEnctype")', 'undefined');
78 input.setAttribute('formEnctype', undefined); 78 input.setAttribute('formEnctype', undefined);
79 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded'); 79 shouldBeEqualToString('input.formEnctype', 'application/x-www-form-urlencoded');
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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