Chromium Code Reviews| Index: third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp |
| index c97c74561cf132ac33cc553a3cb8dab64b713050..0de438dc108fb2e151d3977a8e2ad23db94e7e22 100644 |
| --- a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp |
| +++ b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp |
| @@ -35,4 +35,27 @@ TEST(FontCache, getLastResortFallbackFont) |
| EXPECT_TRUE(fontData); |
| } |
| +TEST(FontCache, availablePriorityFallbackFonts) |
|
wkorman
2016/01/25 23:38:16
Tests with invalid and text?
drott
2016/02/02 17:28:28
...however I did not manage to get them to work re
|
| +{ |
| + FontCache* fontCache = FontCache::fontCache(); |
| + ASSERT_TRUE(fontCache); |
| + |
| + EmptyPlatform platform; |
| + |
| + FontDescription fontDescription; |
| + fontDescription.setGenericFamily(FontDescription::StandardFamily); |
| + |
| + for (FontFallbackPriority fallbackPriority : |
| + { FontFallbackPriority::Symbols, |
| + FontFallbackPriority::Math, |
| + FontFallbackPriority::EmojiText, |
| + FontFallbackPriority::EmojiEmoji }) { |
| + |
| + const Vector<AtomicString> availableFallbackPriorityFonts = |
| + fontCache->fontListForFallbackPriority(fontDescription, |
| + fallbackPriority); |
| + EXPECT_GE(availableFallbackPriorityFonts.size(), 1u); |
| + } |
| +} |
| + |
| } // namespace blink |