Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / textarea / textarea-inputmode.html
blobee8a965838f8b6e1d8254f78ba2cc57ca2dce29d
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description('Tests the behavior of .inputMode of HTMLTextAreaElement.');
10 var textarea = document.createElement('textarea');
12 // .inputMode just reflect the corresponding attributes.
13 textarea.type = 'text';
14 shouldBe('textarea.inputMode', '""');
15 textarea.setAttribute('inputmode', '0');
16 shouldBe('textarea.inputMode', '"0"');
17 textarea.setAttribute('inputmode', 'abc');
18 shouldBe('textarea.inputMode', '"abc"');
20 textarea.inputMode = 'foo';
21 shouldBe('textarea.getAttribute("inputmode")', '"foo"');
23 textarea.inputMode = '';
24 shouldBe('textarea.getAttribute("inputmode")', '""');
26 // Null.
27 debug('Setting null to inputMode:');
28 textarea.inputMode = null;
29 shouldBe('textarea.inputMode', '"null"');
30 shouldBe('textarea.getAttribute("inputmode")', '"null"');
31 textarea.setAttribute('inputmode', null);
32 shouldBe('textarea.inputMode', '"null"');
34 // Undefined.
35 debug('Setting undefined to inputMode:');
36 textarea.inputMode = undefined;
37 shouldBe('textarea.inputMode', '"undefined"');
38 shouldBe('textarea.getAttribute("inputmode")', '"undefined"');
39 textarea.setAttribute('inputmode', undefined);
40 shouldBe('textarea.inputMode', '"undefined"');
42 // Non-string.
43 debug('Setting non-string to inputMode:');
44 textarea.inputMode = 256;
45 shouldBe('textarea.inputMode', '"256"');
46 shouldBe('textarea.getAttribute("inputmode")', '"256"');
47 textarea.setAttribute('inputmode', 256);
48 shouldBe('textarea.inputMode', '"256"');
50 </script>
51 </body>
52 </html>