blob: eb51e4274cb2f7ab546bee4a7db6aabb7a436bd9 [file] [log] [blame]
mmaxfield@apple.com105717c2015-09-24 00:40:53 +00001<!DOCTYPE html>
2<html>
3<head>
4<script src="../resources/js-test-pre.js"></script>
5</head>
6<body>
7<script>
8function runTest(property, propertyText, expectedText) {
9 var element = document.createElement("span");
10 element.setAttribute("id", "testElement");
11 if (property != "")
12 element.setAttribute("style", property + ": " + propertyText + ";");
13 document.body.appendChild(element);
14 shouldBeEqualToString("window.getComputedStyle(document.getElementById('testElement')).getPropertyCSSValue('" + property + "').cssText", expectedText);
15 document.body.removeChild(element);
16}
17
18runTest("font-variant-ligatures", "", "normal");
19runTest("font-variant-ligatures", "normal", "normal");
20runTest("font-variant-ligatures", "normal common-ligatures", "normal");
21runTest("font-variant-ligatures", "notavalidvalue", "normal");
22runTest("font-variant-ligatures", "common-ligatures", "common-ligatures");
hyatt@apple.comeda89532016-12-08 02:01:30 +000023runTest("font-variant-ligatures", "common-ligatures common-ligatures", "normal");
mmaxfield@apple.com105717c2015-09-24 00:40:53 +000024runTest("font-variant-ligatures", "no-common-ligatures", "no-common-ligatures");
25runTest("font-variant-ligatures", "discretionary-ligatures", "discretionary-ligatures");
26runTest("font-variant-ligatures", "no-discretionary-ligatures", "no-discretionary-ligatures");
27runTest("font-variant-ligatures", "historical-ligatures", "historical-ligatures");
28runTest("font-variant-ligatures", "no-historical-ligatures", "no-historical-ligatures");
29runTest("font-variant-ligatures", "contextual", "contextual");
30runTest("font-variant-ligatures", "no-contextual", "no-contextual");
31runTest("font-variant-ligatures", "common-ligatures no-contextual", "common-ligatures no-contextual");
32runTest("font-variant-ligatures", "no-contextual common-ligatures", "common-ligatures no-contextual");
33runTest("font-variant-ligatures", "no-contextual common-ligatures notavalidvalue", "normal");
34runTest("font-variant-ligatures", "none", "none");
35runTest("font-variant-ligatures", "no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual", "none");
36
37runTest("font-variant-position", "", "normal");
38runTest("font-variant-position", "normal", "normal");
39runTest("font-variant-position", "notavalidvalue", "normal");
40runTest("font-variant-position", "sub", "sub");
41runTest("font-variant-position", "super", "super");
42runTest("font-variant-position", "sub super", "normal");
43
44runTest("font-variant-caps", "", "normal");
45runTest("font-variant-caps", "normal", "normal");
46runTest("font-variant-caps", "notavalidvalue", "normal");
47runTest("font-variant-caps", "normal notavalidvalue", "normal");
48runTest("font-variant-caps", "normal small-caps", "normal");
49runTest("font-variant-caps", "small-caps", "small-caps");
50runTest("font-variant-caps", "all-small-caps", "all-small-caps");
51runTest("font-variant-caps", "petite-caps", "petite-caps");
52runTest("font-variant-caps", "all-petite-caps", "all-petite-caps");
53runTest("font-variant-caps", "unicase", "unicase");
54runTest("font-variant-caps", "titling-caps", "titling-caps");
55runTest("font-variant-caps", "unicase titling-caps", "normal");
56runTest("font-variant-caps", "small-caps all-small-caps", "normal");
57
58runTest("font-variant-numeric", "", "normal");
59runTest("font-variant-numeric", "normal", "normal");
60runTest("font-variant-numeric", "notavalidvalue", "normal");
61runTest("font-variant-numeric", "normal notavalidvalue", "normal");
62runTest("font-variant-numeric", "normal lining-nums", "normal");
63runTest("font-variant-numeric", "lining-nums", "lining-nums");
64runTest("font-variant-numeric", "oldstyle-nums", "oldstyle-nums");
65runTest("font-variant-numeric", "proportional-nums", "proportional-nums");
66runTest("font-variant-numeric", "tabular-nums", "tabular-nums");
67runTest("font-variant-numeric", "diagonal-fractions", "diagonal-fractions");
68runTest("font-variant-numeric", "stacked-fractions", "stacked-fractions");
69runTest("font-variant-numeric", "ordinal", "ordinal");
70runTest("font-variant-numeric", "slashed-zero", "slashed-zero");
71runTest("font-variant-numeric", "lining-nums slashed-zero", "lining-nums slashed-zero");
hyatt@apple.comeda89532016-12-08 02:01:30 +000072runTest("font-variant-numeric", "lining-nums oldstyle-nums", "normal");
73runTest("font-variant-numeric", "proportional-nums tabular-nums", "normal");
74runTest("font-variant-numeric", "diagonal-fractions stacked-fractions", "normal");
mmaxfield@apple.com105717c2015-09-24 00:40:53 +000075runTest("font-variant-numeric", "lining-nums proportional-nums", "lining-nums proportional-nums");
76runTest("font-variant-numeric", "lining-nums diagonal-fractions", "lining-nums diagonal-fractions");
77runTest("font-variant-numeric", "ordinal slashed-zero", "ordinal slashed-zero");
78
79runTest("font-variant-alternates", "", "normal");
80runTest("font-variant-alternates", "normal", "normal");
81runTest("font-variant-alternates", "notavalidvalue", "normal");
82runTest("font-variant-alternates", "normal notavalidvalue", "normal");
83runTest("font-variant-alternates", "historical-forms", "historical-forms");
84runTest("font-variant-alternates", "normal historical-forms", "normal");
85
86runTest("font-variant-east-asian", "", "normal");
87runTest("font-variant-east-asian", "normal", "normal");
88runTest("font-variant-east-asian", "notavalidvalue", "normal");
89runTest("font-variant-east-asian", "normal notavalidvalue", "normal");
90runTest("font-variant-east-asian", "jis78", "jis78");
91runTest("font-variant-east-asian", "jis83", "jis83");
92runTest("font-variant-east-asian", "jis90", "jis90");
93runTest("font-variant-east-asian", "jis04", "jis04");
94runTest("font-variant-east-asian", "simplified", "simplified");
95runTest("font-variant-east-asian", "traditional", "traditional");
96runTest("font-variant-east-asian", "full-width", "full-width");
97runTest("font-variant-east-asian", "proportional-width", "proportional-width");
98runTest("font-variant-east-asian", "ruby", "ruby");
mmaxfield@apple.com87dd5c52015-12-03 04:08:41 +000099runTest("font-variant-east-asian", "jis78 jis83", "jis83");
100runTest("font-variant-east-asian", "jis90 traditional", "traditional");
mmaxfield@apple.com105717c2015-09-24 00:40:53 +0000101runTest("font-variant-east-asian", "full-width traditional", "traditional full-width");
102runTest("font-variant-east-asian", "jis04 proportional-width", "jis04 proportional-width");
103runTest("font-variant-east-asian", "jis04 proportional-width ruby", "jis04 proportional-width ruby");
104runTest("font-variant-east-asian", "jis83 ruby", "jis83 ruby");
mmaxfield@apple.com87dd5c52015-12-03 04:08:41 +0000105runTest("font-variant-east-asian", "full-width proportional-width", "proportional-width");
mmaxfield@apple.com105717c2015-09-24 00:40:53 +0000106</script>
107<script src="../resources/js-test-post.js"></script>
108</body>
109</html>