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

Side by Side Diff: LayoutTests/fast/dom/HTMLTextAreaElement/script-tests/rows-attribute.js

Issue 795173003: Stricter parsing for rows/cols attribute on textarea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test result Created 6 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
OLDNEW
(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');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698