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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/GenericFontFamilySettingsTest.cpp

Issue 2441343003: Allow the default generic font family settings to find the first available font (Closed)
Patch Set: msw review Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.cpp ('k') | ui/gfx/font_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698