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
fxgc_unittest.cpp
Go to the documentation of this file.
1
// Copyright 2020 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/fxgc_unittest.h"
6
7
#
include
"fxjs/gc/heap.h"
8
#
include
"testing/gtest/include/gtest/gtest.h"
9
#
include
"testing/v8_test_environment.h"
10
#
include
"v8/include/libplatform/libplatform.h"
11
12
FXGCUnitTest
::
FXGCUnitTest
() =
default
;
13
14
FXGCUnitTest
::~
FXGCUnitTest
() =
default
;
15
16
void
FXGCUnitTest
::
SetUp
() {
17
::testing::Test::SetUp();
18
auto
* env =
V8TestEnvironment
::
GetInstance
(
)
;
19
FXGC_Initialize
(
env
->
platform
(
)
,
env
->
isolate
(
)
)
;
20
heap_ = FXGC_CreateHeap();
21
ASSERT_TRUE(heap_);
22
}
23
24
void
FXGCUnitTest
::
TearDown
() {
25
ForceGCAndPump
(
)
;
26
heap_.reset();
27
FXGC_Release
(
)
;
28
::testing::Test::TearDown();
29
}
30
31
void
FXGCUnitTest
::
ForceGCAndPump
() {
32
FXGC_ForceGarbageCollection(heap_.get());
33
Pump
(
)
;
34
}
35
36
void
FXGCUnitTest
::
Pump
() {
37
V8TestEnvironment
::
PumpPlatformMessageLoop
(
38
V8TestEnvironment
::
GetInstance
(
)
->
isolate
(
)
)
;
39
}
FXGCUnitTest
Definition
fxgc_unittest.h:11
FXGCUnitTest::Pump
void Pump()
Definition
fxgc_unittest.cpp:36
FXGCUnitTest::SetUp
void SetUp() override
Definition
fxgc_unittest.cpp:16
FXGCUnitTest::ForceGCAndPump
void ForceGCAndPump()
Definition
fxgc_unittest.cpp:31
FXGCUnitTest::TearDown
void TearDown() override
Definition
fxgc_unittest.cpp:24
FXGCUnitTest::~FXGCUnitTest
~FXGCUnitTest() override
FXGCUnitTest::FXGCUnitTest
FXGCUnitTest()
V8TestEnvironment
Definition
v8_test_environment.h:26
V8TestEnvironment::platform
v8::Platform * platform() const
Definition
v8_test_environment.h:40
V8TestEnvironment::isolate
v8::Isolate * isolate() const
Definition
v8_test_environment.h:41
V8TestEnvironment::PumpPlatformMessageLoop
static void PumpPlatformMessageLoop(v8::Isolate *pIsolate)
Definition
v8_test_environment.cpp:48
V8TestEnvironment::GetInstance
static V8TestEnvironment * GetInstance()
Definition
v8_test_environment.cpp:43
FXGC_Release
void FXGC_Release()
Definition
heap.cpp:59
FXGC_Initialize
void FXGC_Initialize(v8::Platform *platform, v8::Isolate *isolate)
Definition
heap.cpp:51
qtwebengine
src
3rdparty
chromium
third_party
pdfium
testing
fxgc_unittest.cpp
Generated on Thu Nov 14 2024 01:03:40 for Qt by
1.12.0