| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/fonts/GenericFontFamilySettings.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 TEST(GenericFontFamilySettingsTest, FirstAvailableFontFamily) { |
| 12 GenericFontFamilySettings settings; |
| 13 EXPECT_TRUE(settings.standard().isEmpty()); |
| 14 |
| 15 // Returns the first available font if starts with ",". |
| 16 settings.updateStandard(",does not exist, Arial"); |
| 17 EXPECT_EQ("Arial", settings.standard()); |
| 18 |
| 19 // Otherwise returns any strings as they were set. |
| 20 settings.updateStandard("Arial"); |
| 21 EXPECT_EQ("Arial", settings.standard()); |
| 22 settings.updateStandard("does not exist"); |
| 23 EXPECT_EQ("does not exist", settings.standard()); |
| 24 settings.updateStandard("does not exist, Arial"); |
| 25 EXPECT_EQ("does not exist, Arial", settings.standard()); |
| 26 } |
| 27 |
| 28 } // namespace blink |
| OLD | NEW |