Bug 1032671 - Part 5. Add reftest for emoji. r?jfkthame
Windows 7 doesn't have mono symbol font for emoji code mapping. And fontconfig
doesn't have better option for this. So I except to these platforms.
MozReview-Commit-ID: 7TB1guyzBVS
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-1-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback</title>
+<style>
+#test {
+ font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Mozilla';
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>⌚⌛🌀🌁</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-1.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback</title>
+<style>
+#test {
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>⌚⌛🌀🌁</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-2-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback to text font</title>
+<style>
+#test {
+ font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols';
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>⌚⌛🌀🌁</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback to text font</title>
+<style>
+#test {
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>⌚︎⌛︎🌀︎🌁︎</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-3-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback to color font</title>
+<style>
+#test {
+ font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Mozilla';
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>🅰🅱</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/font-matching/emoji-fallback-3.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta charset="utf-8">
+<title>emoji fallback to color font</title>
+<style>
+#test {
+ font-size: 24pt;
+}
+</style>
+</head>
+<body>
+
+<div id=test>🅰️🅱️</div>
+
+</body>
+</html>
--- a/layout/reftests/font-matching/reftest.list
+++ b/layout/reftests/font-matching/reftest.list
@@ -116,16 +116,22 @@ skip-if(!cocoaWidget) != apple-symbols-1
== italic-oblique-4.html italic-oblique-ref.html
== italic-oblique-5.html italic-oblique-ref.html
== italic-oblique-6.html italic-oblique-ref.html
== italic-oblique-7.html italic-oblique-ref.html
== italic-oblique-8.html italic-oblique-ref.html
== italic-oblique-9.html italic-oblique-ref.html
!= italic-oblique-kinnari.html italic-oblique-kinnari-ref.html
+# GTK and Windows 7 don't have full emoji and symbol font, so emoji-fallback-2
+# don't work well.
+== emoji-fallback-1.html emoji-fallback-1-ref.html
+skip-if(gtkWidget||/^Windows\x20NT\x206\.1/.test(http.oscpu)) == emoji-fallback-2.html emoji-fallback-2-ref.html
+== emoji-fallback-3.html emoji-fallback-3-ref.html
+
# system font generic per-language tests, only works under OSX currently
# Bug 1212731 - initial implementation caused startup regression and
# regression with full-width digits display in UI elements. Disable
# tests until these problems are corrected.
# random-if(!OSX) == system-generic-fallback-1.html system-generic-fallback-1-ref.html
# random-if(!OSX) == system-generic-fallback-2.html system-generic-fallback-2-ref.html
# random-if(!OSX) == system-generic-fallback-3.html system-generic-fallback-3-ref.html
# random-if(!OSX) == system-generic-fallback-4.html system-generic-fallback-4-ref.html