Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLTableColElement / span-attribute.html
blobeec4a562cf02c63a419011bc2809a04d4a8db473
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("HTMLTableColElement span attribute test");
10 function spanAttributeEffect(value)
12 var element = document.createElement("col");
13 element.setAttribute("span", value);
14 return element.span;
17 shouldBe('document.createElement("col").span', '1');
19 shouldBe('spanAttributeEffect("")', '1');
21 shouldBe('spanAttributeEffect("1")', '1');
22 shouldBe('spanAttributeEffect("2")', '2');
23 shouldBe('spanAttributeEffect("10")', '10');
25 shouldBe('spanAttributeEffect("0")', '1');
27 shouldBe('spanAttributeEffect("-1")', '1');
29 shouldBe('spanAttributeEffect("1x")', '1');
30 shouldBe('spanAttributeEffect("1.")', '1');
31 shouldBe('spanAttributeEffect("1.9")', '1');
32 shouldBe('spanAttributeEffect("2x")', '2');
33 shouldBe('spanAttributeEffect("2.")', '2');
34 shouldBe('spanAttributeEffect("2.9")', '2');
36 shouldBe('spanAttributeEffect("a")', '1');
37 shouldBe('spanAttributeEffect("\v7")', '1');
38 shouldBe('spanAttributeEffect(" 7")', '7');
40 var arabicIndicDigitOne = String.fromCharCode(0x661);
41 shouldBe('spanAttributeEffect(arabicIndicDigitOne)', '1');
42 shouldBe('spanAttributeEffect("2" + arabicIndicDigitOne)', '2');
44 shouldBe('spanAttributeEffect("2147483647")', '2147483647');
45 shouldBe('spanAttributeEffect("2147483648")', '2147483648');
46 shouldBe('spanAttributeEffect("4294967295")', '4294967295');
47 shouldBe('spanAttributeEffect("4294967296")', '1');
48 </script>
49 </body>
50 </html>