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

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

Issue 1321033003: Fix formAction return value for empty formaction content attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
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.');
11 11
12 var input = document.createElement('input'); 12 var input = document.createElement('input');
13 13
14 debug('Ordinary values for input:'); 14 debug('Ordinary values for input:');
15 input.type = "submit"; 15 input.type = "submit";
16 shouldBeEqualToString('input.formAction', '');
17 shouldBeEqualToString('input.formEnctype', ''); 16 shouldBeEqualToString('input.formEnctype', '');
18 shouldBeEqualToString('input.formMethod', ''); 17 shouldBeEqualToString('input.formMethod', '');
19 shouldBeEqualToString('input.formTarget', ''); 18 shouldBeEqualToString('input.formTarget', '');
20 19
21 input.setAttribute('formAction', 'http://localhost'); 20 input.setAttribute('formAction', 'http://localhost');
22 shouldBeEqualToString('input.formAction', 'http://localhost/'); 21 shouldBeEqualToString('input.formAction', 'http://localhost/');
23 input.setAttribute('formAction', 'http://localhost/'); 22 input.setAttribute('formAction', 'http://localhost/');
24 shouldBeEqualToString('input.formAction', 'http://localhost/'); 23 shouldBeEqualToString('input.formAction', 'http://localhost/');
25 input.setAttribute('formEnctype', 'text/plain'); 24 input.setAttribute('formEnctype', 'text/plain');
26 shouldBeEqualToString('input.formEnctype', 'text/plain'); 25 shouldBeEqualToString('input.formEnctype', 'text/plain');
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 input.formTarget = 256; 102 input.formTarget = 256;
104 shouldBeEqualToString('input.formTarget', '256'); 103 shouldBeEqualToString('input.formTarget', '256');
105 shouldBeEqualToString('input.getAttribute("formTarget")', '256'); 104 shouldBeEqualToString('input.getAttribute("formTarget")', '256');
106 input.setAttribute('formTarget', 256); 105 input.setAttribute('formTarget', 256);
107 shouldBeEqualToString('input.formTarget', '256'); 106 shouldBeEqualToString('input.formTarget', '256');
108 107
109 var button = document.createElement('button'); 108 var button = document.createElement('button');
110 debug(''); 109 debug('');
111 debug('Ordinary values for button:'); 110 debug('Ordinary values for button:');
112 button.type = "submit"; 111 button.type = "submit";
113 shouldBeEqualToString('button.formAction', '');
114 shouldBeEqualToString('button.formEnctype', ''); 112 shouldBeEqualToString('button.formEnctype', '');
115 shouldBeEqualToString('button.formMethod', ''); 113 shouldBeEqualToString('button.formMethod', '');
116 shouldBeEqualToString('button.formTarget', ''); 114 shouldBeEqualToString('button.formTarget', '');
117 115
118 button.setAttribute('formAction', 'http://localhost'); 116 button.setAttribute('formAction', 'http://localhost');
119 shouldBeEqualToString('button.formAction', 'http://localhost/'); 117 shouldBeEqualToString('button.formAction', 'http://localhost/');
120 button.setAttribute('formAction', 'http://localhost/'); 118 button.setAttribute('formAction', 'http://localhost/');
121 shouldBeEqualToString('button.formAction', 'http://localhost/'); 119 shouldBeEqualToString('button.formAction', 'http://localhost/');
122 button.setAttribute('formEnctype', 'text/plain'); 120 button.setAttribute('formEnctype', 'text/plain');
123 shouldBeEqualToString('button.formEnctype', 'text/plain'); 121 shouldBeEqualToString('button.formEnctype', 'text/plain');
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 button.setAttribute('formMethod', 17); 196 button.setAttribute('formMethod', 17);
199 shouldBeEqualToString('button.formMethod', 'get'); 197 shouldBeEqualToString('button.formMethod', 'get');
200 button.formTarget = 100; 198 button.formTarget = 100;
201 shouldBeEqualToString('button.formTarget', '100'); 199 shouldBeEqualToString('button.formTarget', '100');
202 shouldBeEqualToString('button.getAttribute("formTarget")', '100'); 200 shouldBeEqualToString('button.getAttribute("formTarget")', '100');
203 button.setAttribute('formTarget', 281); 201 button.setAttribute('formTarget', 281);
204 shouldBeEqualToString('button.formTarget', '281'); 202 shouldBeEqualToString('button.formTarget', '281');
205 </script> 203 </script>
206 </body> 204 </body>
207 </html> 205 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/submit-form-attributes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698