Bug 1367860 (part 5) - Add testcases. r?dbaron
MozReview-Commit-ID: E29lR1RMDp4
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",