Bug 1032671 - Part 5. Add reftest for emoji. r?jfkthame draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Sat, 18 Nov 2017 20:15:05 +0900
changeset 706550 b18816d7575bf7d62d76db4b6c99243cf59153ef
parent 706549 dc20923dd31b4a4522c243175c27238b2e3ae381
child 742684 767ecf4b85386cf4b05a86e93ba09d4723d1a9dd
push id91829
push userbmo:m_kato@ga2.so-net.ne.jp
push dateSat, 02 Dec 2017 09:30:34 +0000
reviewersjfkthame
bugs1032671
milestone59.0a1
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
layout/reftests/font-matching/emoji-fallback-1-ref.html
layout/reftests/font-matching/emoji-fallback-1.html
layout/reftests/font-matching/emoji-fallback-2-ref.html
layout/reftests/font-matching/emoji-fallback-2.html
layout/reftests/font-matching/emoji-fallback-3-ref.html
layout/reftests/font-matching/emoji-fallback-3.html
layout/reftests/font-matching/reftest.list
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>&#x231a;&#x231b;&#x1f300;&#x1f301;</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>&#x231a;&#x231b;&#x1f300;&#x1f301;</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>&#x231a;&#x231b;&#x1f300;&#x1f301;</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>&#x231a;&#xfe0e;&#x231b;&#xfe0e;&#x1f300;&#xfe0e;&#x1f301;&#xfe0e;</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>&#x1f170;&#x1f171;</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>&#x1f170;&#xfe0f;&#x1f171;&#xfe0f;</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