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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLInputElement/size-attribute.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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
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 <script src="script-tests/size-attribute.js"></script> 7 <script>
8 description("HTMLInputElement size attribute test");
9
10 function sizeAttributeEffect(value)
11 {
12 var element = document.createElement("input");
13 element.setAttribute("size", value);
14 return element.size;
15 }
16
17 shouldBe('document.createElement("input").size', '20');
18
19 shouldBe('sizeAttributeEffect("")', '20');
20
21 shouldBe('sizeAttributeEffect("1")', '1');
22 shouldBe('sizeAttributeEffect("2")', '2');
23 shouldBe('sizeAttributeEffect("10")', '10');
24
25 shouldBe('sizeAttributeEffect("0")', '20');
26
27 shouldBe('sizeAttributeEffect("-1")', '20');
28
29 shouldBe('sizeAttributeEffect("1x")', '1');
30 shouldBe('sizeAttributeEffect("1.")', '1');
31 shouldBe('sizeAttributeEffect("1.9")', '1');
32 shouldBe('sizeAttributeEffect("2x")', '2');
33 shouldBe('sizeAttributeEffect("2.")', '2');
34 shouldBe('sizeAttributeEffect("2.9")', '2');
35
36 shouldBe('sizeAttributeEffect("a")', '20');
37 shouldBe('sizeAttributeEffect("\v7")', '20');
38 shouldBe('sizeAttributeEffect(" 7")', '7');
39
40 var arabicIndicDigitOne = String.fromCharCode(0x661);
41 shouldBe('sizeAttributeEffect(arabicIndicDigitOne)', '20');
42 shouldBe('sizeAttributeEffect("2" + arabicIndicDigitOne)', '2');
43
44 shouldBe('sizeAttributeEffect("2147483647")', '2147483647');
45 shouldBe('sizeAttributeEffect("2147483648")', '20');
46 shouldBe('sizeAttributeEffect("4294967295")', '20');
47 shouldBe('sizeAttributeEffect("4294967296")', '20');
48 </script>
8 </body> 49 </body>
9 </html> 50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698