mmaxfield@apple.com | 105717c | 2015-09-24 00:40:53 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <script src="../resources/js-test-pre.js"></script> |
| 5 | </head> |
| 6 | <body> |
| 7 | <script> |
| 8 | function 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 | |
| 18 | runTest("font-variant-ligatures", "", "normal"); |
| 19 | runTest("font-variant-ligatures", "normal", "normal"); |
| 20 | runTest("font-variant-ligatures", "normal common-ligatures", "normal"); |
| 21 | runTest("font-variant-ligatures", "notavalidvalue", "normal"); |
| 22 | runTest("font-variant-ligatures", "common-ligatures", "common-ligatures"); |
hyatt@apple.com | eda8953 | 2016-12-08 02:01:30 +0000 | [diff] [blame] | 23 | runTest("font-variant-ligatures", "common-ligatures common-ligatures", "normal"); |
mmaxfield@apple.com | 105717c | 2015-09-24 00:40:53 +0000 | [diff] [blame] | 24 | runTest("font-variant-ligatures", "no-common-ligatures", "no-common-ligatures"); |
| 25 | runTest("font-variant-ligatures", "discretionary-ligatures", "discretionary-ligatures"); |
| 26 | runTest("font-variant-ligatures", "no-discretionary-ligatures", "no-discretionary-ligatures"); |
| 27 | runTest("font-variant-ligatures", "historical-ligatures", "historical-ligatures"); |
| 28 | runTest("font-variant-ligatures", "no-historical-ligatures", "no-historical-ligatures"); |
| 29 | runTest("font-variant-ligatures", "contextual", "contextual"); |
| 30 | runTest("font-variant-ligatures", "no-contextual", "no-contextual"); |
| 31 | runTest("font-variant-ligatures", "common-ligatures no-contextual", "common-ligatures no-contextual"); |
| 32 | runTest("font-variant-ligatures", "no-contextual common-ligatures", "common-ligatures no-contextual"); |
| 33 | runTest("font-variant-ligatures", "no-contextual common-ligatures notavalidvalue", "normal"); |
| 34 | runTest("font-variant-ligatures", "none", "none"); |
| 35 | runTest("font-variant-ligatures", "no-common-ligatures no-discretionary-ligatures no-historical-ligatures no-contextual", "none"); |
| 36 | |
| 37 | runTest("font-variant-position", "", "normal"); |
| 38 | runTest("font-variant-position", "normal", "normal"); |
| 39 | runTest("font-variant-position", "notavalidvalue", "normal"); |
| 40 | runTest("font-variant-position", "sub", "sub"); |
| 41 | runTest("font-variant-position", "super", "super"); |
| 42 | runTest("font-variant-position", "sub super", "normal"); |
| 43 | |
| 44 | runTest("font-variant-caps", "", "normal"); |
| 45 | runTest("font-variant-caps", "normal", "normal"); |
| 46 | runTest("font-variant-caps", "notavalidvalue", "normal"); |
| 47 | runTest("font-variant-caps", "normal notavalidvalue", "normal"); |
| 48 | runTest("font-variant-caps", "normal small-caps", "normal"); |
| 49 | runTest("font-variant-caps", "small-caps", "small-caps"); |
| 50 | runTest("font-variant-caps", "all-small-caps", "all-small-caps"); |
| 51 | runTest("font-variant-caps", "petite-caps", "petite-caps"); |
| 52 | runTest("font-variant-caps", "all-petite-caps", "all-petite-caps"); |
| 53 | runTest("font-variant-caps", "unicase", "unicase"); |
| 54 | runTest("font-variant-caps", "titling-caps", "titling-caps"); |
| 55 | runTest("font-variant-caps", "unicase titling-caps", "normal"); |
| 56 | runTest("font-variant-caps", "small-caps all-small-caps", "normal"); |
| 57 | |
| 58 | runTest("font-variant-numeric", "", "normal"); |
| 59 | runTest("font-variant-numeric", "normal", "normal"); |
| 60 | runTest("font-variant-numeric", "notavalidvalue", "normal"); |
| 61 | runTest("font-variant-numeric", "normal notavalidvalue", "normal"); |
| 62 | runTest("font-variant-numeric", "normal lining-nums", "normal"); |
| 63 | runTest("font-variant-numeric", "lining-nums", "lining-nums"); |
| 64 | runTest("font-variant-numeric", "oldstyle-nums", "oldstyle-nums"); |
| 65 | runTest("font-variant-numeric", "proportional-nums", "proportional-nums"); |
| 66 | runTest("font-variant-numeric", "tabular-nums", "tabular-nums"); |
| 67 | runTest("font-variant-numeric", "diagonal-fractions", "diagonal-fractions"); |
| 68 | runTest("font-variant-numeric", "stacked-fractions", "stacked-fractions"); |
| 69 | runTest("font-variant-numeric", "ordinal", "ordinal"); |
| 70 | runTest("font-variant-numeric", "slashed-zero", "slashed-zero"); |
| 71 | runTest("font-variant-numeric", "lining-nums slashed-zero", "lining-nums slashed-zero"); |
hyatt@apple.com | eda8953 | 2016-12-08 02:01:30 +0000 | [diff] [blame] | 72 | runTest("font-variant-numeric", "lining-nums oldstyle-nums", "normal"); |
| 73 | runTest("font-variant-numeric", "proportional-nums tabular-nums", "normal"); |
| 74 | runTest("font-variant-numeric", "diagonal-fractions stacked-fractions", "normal"); |
mmaxfield@apple.com | 105717c | 2015-09-24 00:40:53 +0000 | [diff] [blame] | 75 | runTest("font-variant-numeric", "lining-nums proportional-nums", "lining-nums proportional-nums"); |
| 76 | runTest("font-variant-numeric", "lining-nums diagonal-fractions", "lining-nums diagonal-fractions"); |
| 77 | runTest("font-variant-numeric", "ordinal slashed-zero", "ordinal slashed-zero"); |
| 78 | |
| 79 | runTest("font-variant-alternates", "", "normal"); |
| 80 | runTest("font-variant-alternates", "normal", "normal"); |
| 81 | runTest("font-variant-alternates", "notavalidvalue", "normal"); |
| 82 | runTest("font-variant-alternates", "normal notavalidvalue", "normal"); |
| 83 | runTest("font-variant-alternates", "historical-forms", "historical-forms"); |
| 84 | runTest("font-variant-alternates", "normal historical-forms", "normal"); |
| 85 | |
| 86 | runTest("font-variant-east-asian", "", "normal"); |
| 87 | runTest("font-variant-east-asian", "normal", "normal"); |
| 88 | runTest("font-variant-east-asian", "notavalidvalue", "normal"); |
| 89 | runTest("font-variant-east-asian", "normal notavalidvalue", "normal"); |
| 90 | runTest("font-variant-east-asian", "jis78", "jis78"); |
| 91 | runTest("font-variant-east-asian", "jis83", "jis83"); |
| 92 | runTest("font-variant-east-asian", "jis90", "jis90"); |
| 93 | runTest("font-variant-east-asian", "jis04", "jis04"); |
| 94 | runTest("font-variant-east-asian", "simplified", "simplified"); |
| 95 | runTest("font-variant-east-asian", "traditional", "traditional"); |
| 96 | runTest("font-variant-east-asian", "full-width", "full-width"); |
| 97 | runTest("font-variant-east-asian", "proportional-width", "proportional-width"); |
| 98 | runTest("font-variant-east-asian", "ruby", "ruby"); |
mmaxfield@apple.com | 87dd5c5 | 2015-12-03 04:08:41 +0000 | [diff] [blame] | 99 | runTest("font-variant-east-asian", "jis78 jis83", "jis83"); |
| 100 | runTest("font-variant-east-asian", "jis90 traditional", "traditional"); |
mmaxfield@apple.com | 105717c | 2015-09-24 00:40:53 +0000 | [diff] [blame] | 101 | runTest("font-variant-east-asian", "full-width traditional", "traditional full-width"); |
| 102 | runTest("font-variant-east-asian", "jis04 proportional-width", "jis04 proportional-width"); |
| 103 | runTest("font-variant-east-asian", "jis04 proportional-width ruby", "jis04 proportional-width ruby"); |
| 104 | runTest("font-variant-east-asian", "jis83 ruby", "jis83 ruby"); |
mmaxfield@apple.com | 87dd5c5 | 2015-12-03 04:08:41 +0000 | [diff] [blame] | 105 | runTest("font-variant-east-asian", "full-width proportional-width", "proportional-width"); |
mmaxfield@apple.com | 105717c | 2015-09-24 00:40:53 +0000 | [diff] [blame] | 106 | </script> |
| 107 | <script src="../resources/js-test-post.js"></script> |
| 108 | </body> |
| 109 | </html> |