summaryrefslogtreecommitdiffstats
path: root/layout/style/test/test_bug892929.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/style/test/test_bug892929.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/style/test/test_bug892929.html')
-rw-r--r--layout/style/test/test_bug892929.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/layout/style/test/test_bug892929.html b/layout/style/test/test_bug892929.html
new file mode 100644
index 000000000..a67db56ee
--- /dev/null
+++ b/layout/style/test/test_bug892929.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset=utf-8>
+ <title>Bug 892929 test</title>
+ <link rel="author" title="John Daggett" href="mailto:jdaggett@mozilla.com">
+ <link rel="help" href="http://www.w3.org/TR/css-fonts-3/#om-fontfeaturevalues" />
+ <meta name="assert" content="window.CSSFontFeatureValuesRule should appear by default" />
+ <script type="text/javascript" src="/resources/testharness.js"></script>
+ <script type="text/javascript" src="/resources/testharnessreport.js"></script>
+ <style type="text/css">
+ </style>
+</head>
+<body>
+<div id="log"></div>
+<pre id="display"></pre>
+
+<script type="text/javascript">
+
+function testCSSFontFeatureValuesRuleOM() {
+ var s = document.documentElement.style;
+ var cs = window.getComputedStyle(document.documentElement);
+
+ var hasFFVRule = "CSSFontFeatureValuesRule" in window;
+ var hasStyleAlternates = "fontVariantAlternates" in s;
+ var hasCompStyleAlternates = "fontVariantAlternates" in cs;
+
+ test(function() {
+ assert_equals(hasFFVRule,
+ hasStyleAlternates,
+ "style.fontVariantAlternates " +
+ (hasStyleAlternates ? "available" : "not available") +
+ " but " +
+ "window.CSSFontFeatureValuesRule " +
+ (hasFFVRule ? "available" : "not available") +
+ " - ");
+ }, "style.fontVariantAlternates availability matches window.CSSFontFeatureValuesRule availability");
+
+ test(function() {
+ assert_equals(hasFFVRule,
+ hasCompStyleAlternates,
+ "computedStyle.fontVariantAlternates " +
+ (hasCompStyleAlternates ? "available" : "not available") +
+ " but " +
+ "window.CSSFontFeatureValuesRule " +
+ (hasFFVRule ? "available" : "not available") +
+ " - ");
+ }, "computedStyle.fontVariantAlternates availability matches window.CSSFontFeatureValuesRule availability");
+
+ // if window.CSSFontFeatureValuesRule isn't around, neither should any of the font feature props
+ fontFeatureProps = [ "fontKerning", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian",
+ "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", "fontSynthesis",
+ "fontFeatureSettings", "fontLanguageOverride" ];
+
+ if (!hasFFVRule) {
+ var i;
+ for (i = 0; i < fontFeatureProps.length; i++) {
+ var prop = fontFeatureProps[i];
+ test(function() {
+ assert_true(!(prop in s), "window.CSSFontFeatureValuesRule not available but style." + prop + " is available - ");
+ }, "style." + prop + " availability");
+ test(function() {
+ assert_true(!(prop in cs), "window.CSSFontFeatureValuesRule not available but computedStyle." + prop + " is available - ");
+ }, "computedStyle." + prop + " availability");
+ }
+ }
+
+}
+
+testCSSFontFeatureValuesRuleOM();
+
+</script>
+</body>
+</html>