| 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(",not exist, Arial"); |
| 17 EXPECT_EQ("Arial", settings.standard()); |
| 18 |
| 19 // Otherwise returns any strings as they were set. |
| 20 AtomicString nonLists[] = { |
| 21 "Arial", "not exist", "not exist, Arial", |
| 22 }; |
| 23 for (const AtomicString& name : nonLists) { |
| 24 settings.updateStandard(name); |
| 25 EXPECT_EQ(name, settings.standard()); |
| 26 } |
| 27 } |
| 28 |
| 29 } // namespace blink |
| OLD | NEW |