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

Side by Side Diff: LayoutTests/fast/forms/textarea/textarea-inputmode.html

Issue 101423002: Remove TreatNullAs=NullString for HTMLTextAreaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase on top of HTMLSelectElement patch 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> 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 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description('Tests the behavior of .inputMode of HTMLTextAreaElement.'); 8 description('Tests the behavior of .inputMode of HTMLTextAreaElement.');
9 9
10 var textarea = document.createElement('textarea'); 10 var textarea = document.createElement('textarea');
11 11
12 // .inputMode just reflect the corresponding attributes. 12 // .inputMode just reflect the corresponding attributes.
13 textarea.type = 'text'; 13 textarea.type = 'text';
14 shouldBe('textarea.inputMode', '""'); 14 shouldBe('textarea.inputMode', '""');
15 textarea.setAttribute('inputmode', '0'); 15 textarea.setAttribute('inputmode', '0');
16 shouldBe('textarea.inputMode', '"0"'); 16 shouldBe('textarea.inputMode', '"0"');
17 textarea.setAttribute('inputmode', 'abc'); 17 textarea.setAttribute('inputmode', 'abc');
18 shouldBe('textarea.inputMode', '"abc"'); 18 shouldBe('textarea.inputMode', '"abc"');
19 19
20 textarea.inputMode = 'foo'; 20 textarea.inputMode = 'foo';
21 shouldBe('textarea.getAttribute("inputmode")', '"foo"'); 21 shouldBe('textarea.getAttribute("inputmode")', '"foo"');
22 22
23 textarea.inputMode = ''; 23 textarea.inputMode = '';
24 shouldBe('textarea.getAttribute("inputmode")', '""'); 24 shouldBe('textarea.getAttribute("inputmode")', '""');
25 25
26 // Null. 26 // Null.
27 debug('Setting null to inputMode:'); 27 debug('Setting null to inputMode:');
28 textarea.inputMode = null; 28 textarea.inputMode = null;
29 shouldBe('textarea.inputMode', '""'); 29 shouldBe('textarea.inputMode', '"null"');
30 shouldBe('textarea.getAttribute("inputmode")', 'null'); 30 shouldBe('textarea.getAttribute("inputmode")', '"null"');
31 textarea.setAttribute('inputmode', null); 31 textarea.setAttribute('inputmode', null);
32 shouldBe('textarea.inputMode', '"null"'); 32 shouldBe('textarea.inputMode', '"null"');
33 33
34 // Undefined. 34 // Undefined.
35 debug('Setting undefined to inputMode:'); 35 debug('Setting undefined to inputMode:');
36 textarea.inputMode = undefined; 36 textarea.inputMode = undefined;
37 shouldBe('textarea.inputMode', '"undefined"'); 37 shouldBe('textarea.inputMode', '"undefined"');
38 shouldBe('textarea.getAttribute("inputmode")', '"undefined"'); 38 shouldBe('textarea.getAttribute("inputmode")', '"undefined"');
39 textarea.setAttribute('inputmode', undefined); 39 textarea.setAttribute('inputmode', undefined);
40 shouldBe('textarea.inputMode', '"undefined"'); 40 shouldBe('textarea.inputMode', '"undefined"');
41 41
42 // Non-string. 42 // Non-string.
43 debug('Setting non-string to inputMode:'); 43 debug('Setting non-string to inputMode:');
44 textarea.inputMode = 256; 44 textarea.inputMode = 256;
45 shouldBe('textarea.inputMode', '"256"'); 45 shouldBe('textarea.inputMode', '"256"');
46 shouldBe('textarea.getAttribute("inputmode")', '"256"'); 46 shouldBe('textarea.getAttribute("inputmode")', '"256"');
47 textarea.setAttribute('inputmode', 256); 47 textarea.setAttribute('inputmode', 256);
48 shouldBe('textarea.inputMode', '"256"'); 48 shouldBe('textarea.inputMode', '"256"');
49 49
50 </script> 50 </script>
51 </body> 51 </body>
52 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698