OLD | NEW |
---|---|
(Empty) | |
1 description("HTMLTextAreaElement rows attribute test"); | |
tkent
2014/12/15 23:51:56
Ditto.
| |
2 | |
3 function rowsAttributeEffect(value) | |
4 { | |
5 var element = document.createElement("textarea"); | |
6 element.setAttribute("rows", value); | |
7 return element.rows; | |
8 } | |
9 | |
10 shouldBe('document.createElement("textarea").rows', '2'); | |
11 | |
12 shouldBe('rowsAttributeEffect("")', '2'); | |
13 | |
14 shouldBe('rowsAttributeEffect("1")', '1'); | |
15 shouldBe('rowsAttributeEffect("2")', '2'); | |
16 shouldBe('rowsAttributeEffect("10")', '10'); | |
17 | |
18 shouldBe('rowsAttributeEffect("0")', '2'); | |
19 | |
20 shouldBe('rowsAttributeEffect("-1")', '2'); | |
21 | |
22 shouldBe('rowsAttributeEffect("1x")', '1'); | |
23 shouldBe('rowsAttributeEffect("1.")', '1'); | |
24 shouldBe('rowsAttributeEffect("1.9")', '1'); | |
25 shouldBe('rowsAttributeEffect("2x")', '2'); | |
26 shouldBe('rowsAttributeEffect("2.")', '2'); | |
27 shouldBe('rowsAttributeEffect("2.9")', '2'); | |
28 | |
29 shouldBe('rowsAttributeEffect("a")', '2'); | |
30 shouldBe('rowsAttributeEffect("\v7")', '2'); | |
31 shouldBe('rowsAttributeEffect(" 7")', '7'); | |
32 | |
33 var arabicIndicDigitOne = String.fromCharCode(0x661); | |
34 shouldBe('rowsAttributeEffect(arabicIndicDigitOne)', '2'); | |
35 shouldBe('rowsAttributeEffect("2" + arabicIndicDigitOne)', '2'); | |
36 | |
37 shouldBe('rowsAttributeEffect("2147483647")', '2147483647'); | |
38 shouldBe('rowsAttributeEffect("2147483648")', '2'); | |
39 shouldBe('rowsAttributeEffect("4294967295")', '2'); | |
40 shouldBe('rowsAttributeEffect("4294967296")', '2'); | |
OLD | NEW |