Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
font_collection_tests.cc
Go to the documentation of this file.
1/*
2 * Copyright 2017 Google, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "gtest/gtest.h"
18
19#include <sstream>
20
21#include "txt/font_collection.h"
22
23namespace txt {
24namespace testing {
25
26class FontCollectionTests : public ::testing::Test {
27 public:
29
30 void SetUp() override {}
31};
32
33TEST_F(FontCollectionTests, SettingUpDefaultFontManagerClearsCache) {
34 FontCollection font_collection;
36 font_collection.CreateSktFontCollection();
37 ASSERT_EQ(sk_font_collection->getFallbackManager().get(), nullptr);
38 font_collection.SetupDefaultFontManager(0);
39 sk_font_collection = font_collection.CreateSktFontCollection();
40 ASSERT_NE(sk_font_collection->getFallbackManager().get(), nullptr);
41}
42} // namespace testing
43} // namespace txt
void SetupDefaultFontManager(uint32_t font_initialization_data)
T * get() const
Definition SkRefCnt.h:303
TEST_F(DisplayListTest, Defaults)