Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp

Issue 2441343003: Allow the default generic font family settings to find the first available font (Closed)
Patch Set: Add more tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5eeaa67825c3a4ce757ea3384c856d2bd03f4be7..d23e3506b849f2939214303ad33dc9798d510742 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
@@ -35,4 +35,11 @@ TEST(FontCache, getLastResortFallbackFont) {
EXPECT_TRUE(fontData);
}
+TEST(FontCache, firstAvailableOrFirst) {
+ EXPECT_TRUE(FontCache::firstAvailableOrFirst("").isEmpty());
+ EXPECT_TRUE(FontCache::firstAvailableOrFirst(String()).isEmpty());
+
+ EXPECT_EQ("Arial", FontCache::firstAvailableOrFirst("not exist, Arial"));
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698