| 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..8f2dc92fdd4cc426ba4019d967d3142cba85a34f 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/FontCacheTest.cpp
|
| @@ -35,4 +35,24 @@ 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("Arial"));
|
| + EXPECT_EQ("not exist", FontCache::firstAvailableOrFirst("not exist"));
|
| +
|
| + EXPECT_EQ("Arial", FontCache::firstAvailableOrFirst("Arial, not exist"));
|
| + EXPECT_EQ("Arial", FontCache::firstAvailableOrFirst("not exist, Arial"));
|
| + EXPECT_EQ("Arial",
|
| + FontCache::firstAvailableOrFirst("not exist, Arial, not exist"));
|
| +
|
| + EXPECT_EQ("not exist",
|
| + FontCache::firstAvailableOrFirst("not exist, not exist 2"));
|
| +
|
| + EXPECT_EQ("Arial", FontCache::firstAvailableOrFirst(", not exist, Arial"));
|
| + EXPECT_EQ("not exist",
|
| + FontCache::firstAvailableOrFirst(", not exist, not exist"));
|
| +}
|
| +
|
| } // namespace blink
|
|
|