From 694949baae96cc2e2cb11407daeb483c38a36370 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 15 Feb 2018 18:48:22 +0000 Subject: [PATCH] Bug 1435989 - Test for the InspectorFontFace.ranges attribute. r=dholbert --- layout/inspector/tests/chrome/chrome.ini | 3 + .../tests/chrome/test_fontFaceRanges.css | 17 ++ .../tests/chrome/test_fontFaceRanges.xul | 189 ++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 layout/inspector/tests/chrome/test_fontFaceRanges.css create mode 100644 layout/inspector/tests/chrome/test_fontFaceRanges.xul diff --git a/layout/inspector/tests/chrome/chrome.ini b/layout/inspector/tests/chrome/chrome.ini index da957f0b10af..6ba826650e16 100644 --- a/layout/inspector/tests/chrome/chrome.ini +++ b/layout/inspector/tests/chrome/chrome.ini @@ -17,6 +17,9 @@ support-files = [test_parseStyleSheetObservers.html] support-files = imported_no_op.css +[test_fontFaceRanges.xul] +support-files = + test_fontFaceRanges.css [test_fontFeaturesAPI.xul] support-files = test_fontFeaturesAPI.css diff --git a/layout/inspector/tests/chrome/test_fontFaceRanges.css b/layout/inspector/tests/chrome/test_fontFaceRanges.css new file mode 100644 index 000000000000..637c4079803d --- /dev/null +++ b/layout/inspector/tests/chrome/test_fontFaceRanges.css @@ -0,0 +1,17 @@ +@font-face { + font-family: capitals; + src: url(GentiumPlus-R.woff) format("woff"); + unicode-range: U+0041-005A; +} +@font-face { + font-family: lowercase; + src: url(GentiumPlus-R.woff) format("woff"); + unicode-range: U+0061-007A; +} +@font-face { + font-family: gentium; + src: url(GentiumPlus-R.woff) format("woff"); +} +.gentium { + font-family: capitals, lowercase, gentium, sans-serif; +} diff --git a/layout/inspector/tests/chrome/test_fontFaceRanges.xul b/layout/inspector/tests/chrome/test_fontFaceRanges.xul new file mode 100644 index 000000000000..c0fd164a2632 --- /dev/null +++ b/layout/inspector/tests/chrome/test_fontFaceRanges.xul @@ -0,0 +1,189 @@ + + + + + + + + + + Mozilla Bug 1435989 + +
Hello 你 World 好!
+
Hello العربي World!
+
Hello mul­ti­line World!
+
Hellocruelworld!
+ + +