Flutter Engine
 
Loading...
Searching...
No Matches
font_collection_tests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 "gtest/gtest.h"
6
7#include <sstream>
8
10
11namespace txt {
12namespace testing {
13
14class FontCollectionTests : public ::testing::Test {
15 public:
17
18 void SetUp() override {}
19};
20
21TEST_F(FontCollectionTests, SettingUpDefaultFontManagerClearsCache) {
22 FontCollection font_collection;
23 sk_sp<skia::textlayout::FontCollection> sk_font_collection =
24 font_collection.CreateSktFontCollection();
25 ASSERT_EQ(sk_font_collection->getFallbackManager().get(), nullptr);
26 font_collection.SetupDefaultFontManager(0);
27 sk_font_collection = font_collection.CreateSktFontCollection();
28 ASSERT_NE(sk_font_collection->getFallbackManager().get(), nullptr);
29}
30} // namespace testing
31} // namespace txt
void SetupDefaultFontManager(uint32_t font_initialization_data)
TEST_F(DisplayListTest, Defaults)