Bug 1367860 (part 5) - Add testcases. r?dbaron draft
authorKevin Hsieh <kevin.hsieh@ucla.edu>
Wed, 16 Aug 2017 19:23:27 -0700
changeset 648529 2f4c86a0a3f5f56f4892bf9ae7e003e5324689c0
parent 648528 6baedb64d7b92ab759c3c7706c331e29d1a72ffc
child 726847 f639e02a17af6d6d328211af4dbc45fd2a418ef2
push id74781
push userbmo:kevin.hsieh@ucla.edu
push dateThu, 17 Aug 2017 22:10:17 +0000
reviewersdbaron
bugs1367860
milestone56.0a1
Bug 1367860 (part 5) - Add testcases. r?dbaron MozReview-Commit-ID: E29lR1RMDp4
layout/reftests/font-matching/1367860-1.htm
layout/reftests/font-matching/1367860-2.htm
layout/reftests/font-matching/1367860-3.htm
layout/reftests/font-matching/1367860-ref.htm
layout/reftests/font-matching/reftest.list
testing/web-platform/meta/MANIFEST.json
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1367860-1.htm
@@ -0,0 +1,20 @@
+<!--
+Reftest for Bug 1367860
+Case 1: Language tag on ancestor / font-family on descendant
+  (passes before patch)
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+</head>
+<body>
+  <div lang="ja" style="font-family: InvalidFontName;">
+    These two lines should be exactly the same.
+  </div>
+  <div lang="ja"><div style="font-family: InvalidFontName;">
+    These two lines should be exactly the same.
+  </div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1367860-2.htm
@@ -0,0 +1,20 @@
+<!--
+Reftest for Bug 1367860
+Case 2: Language tag on descendant / font-family on ancestor
+  (fails before patch)
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+</head>
+<body>
+  <div lang="ja" style="font-family: InvalidFontName;">
+    These two lines should be exactly the same.
+  </div>
+  <div style="font-family: InvalidFontName;"><div lang="ja">
+    These two lines should be exactly the same.
+  </div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1367860-3.htm
@@ -0,0 +1,20 @@
+<!--
+Reftest for Bug 1367860
+Case 3: No font-family tag
+  (fails before patch)
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+</head>
+<body>
+  <div lang="ja" style="font-family: InvalidFontName;">
+    These two lines should be exactly the same.
+  </div>
+  <div lang="ja">
+    These two lines should be exactly the same.
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/1367860-ref.htm
@@ -0,0 +1,15 @@
+<!--
+Reftest for Bug 1367860
+Reference for all cases
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+</head>
+<body lang="ja" style="font-family: InvalidFontName;">
+  <div>These two lines should be exactly the same.</div>
+  <div>These two lines should be exactly the same.</div>
+</body>
+</html>
--- a/layout/reftests/font-matching/reftest.list
+++ b/layout/reftests/font-matching/reftest.list
@@ -1,10 +1,15 @@
 == CSS21-t1502-no-inherited-font-family.xhtml CSS21-t1502-no-inherited-font-family-ref.xhtml
 
+# tests for bug 1367860 (correct default generic font based on language)
+== 1367860-1.htm 1367860-ref.htm
+== 1367860-2.htm 1367860-ref.htm
+== 1367860-3.htm 1367860-ref.htm
+
 # basic tests for bug 538730
 != synthetic-bold-1.html synthetic-bold-1-ref.html
 != synthetic-bold-2.html synthetic-bold-2-ref.html
 
 # synthetic bold/italic tests
 != defaultfont-bold.html defaultfont.html
 != defaultfont-italic.html defaultfont.html 
 != defaultfont-oblique.html defaultfont.html 
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -76758,17 +76758,17 @@
     ]
    ],
    "css/CSS2/selectors/attribute-value-selector-002.xht": [
     [
      "/css/CSS2/selectors/attribute-value-selector-002.xht",
      [
       [
        "/css/CSS2/selectors/attribute-value-selector-001-ref.xht",
-       "=="
+       "!="
       ]
      ],
      {}
     ]
    ],
    "css/CSS2/selectors/attribute-value-selector-003.xht": [
     [
      "/css/CSS2/selectors/attribute-value-selector-003.xht",