Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
xfa_test_environment.cpp
Go to the documentation of this file.
1// Copyright 2019 The PDFium Authors
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 "testing/xfa_test_environment.h"
6
7#include "core/fxge/cfx_fontmgr.h"
8#include "core/fxge/cfx_gemodule.h"
9#include "core/fxge/systemfontinfo_iface.h"
10#include "third_party/base/check.h"
11#include "xfa/fgas/font/cfgas_gemodule.h"
12
13namespace {
14
15XFATestEnvironment* g_env = nullptr;
16
17} // namespace
18
20 DCHECK(!g_env);
21 g_env = this;
22}
23
25 DCHECK(g_env);
26 g_env = nullptr;
27}
28
31 CFX_GEModule::Get()->GetPlatform()->CreateDefaultSystemFontInfo());
32
33 // The font loading that takes place in CFGAS_GEModule::Create() is slow,
34 // but we do it only once per binary execution, not once per test.
36}
37
static void Destroy()
static void Create()
CFX_FontMapper * GetBuiltinMapper() const
Definition cfx_fontmgr.h:71
PlatformIface * GetPlatform() const
static CFX_GEModule * Get()
CFX_FontMgr * GetFontMgr() const