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
external_engine_embedder_test.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/external_engine_embedder_test.h"
6
7
#
include
<
memory
>
8
9
#
include
"fxjs/cfxjs_engine.h"
10
#
include
"testing/v8_test_environment.h"
11
#
include
"v8/include/v8-context.h"
12
#
include
"v8/include/v8-isolate.h"
13
#
include
"v8/include/v8-local-handle.h"
14
15
ExternalEngineEmbedderTest
::
ExternalEngineEmbedderTest
() =
default
;
16
17
ExternalEngineEmbedderTest
::~
ExternalEngineEmbedderTest
() =
default
;
18
19
void
ExternalEngineEmbedderTest
::
SetUp
() {
20
EmbedderTest
::
SetUp
();
21
22
v8::Isolate::Scope isolate_scope(isolate());
23
v8::HandleScope handle_scope(isolate());
24
FXJS_PerIsolateData
::SetUp(
isolate
());
25
m_Engine = std::make_unique<CFXJS_Engine>(isolate());
26
m_Engine->InitializeEngine();
27
}
28
29
void
ExternalEngineEmbedderTest
::
TearDown
() {
30
m_Engine->ReleaseEngine();
31
m_Engine.reset();
32
JSEmbedderTest
::
TearDown
();
33
}
34
35
v8
::
Local
<
v8
::
Context
>
ExternalEngineEmbedderTest
::
GetV8Context
() {
36
return
m_Engine->GetV8Context();
37
}
EmbedderTest
Definition
embedder_test.h:39
EmbedderTest::SetUp
void SetUp() override
Definition
embedder_test.cpp:274
EmbedderTest::TearDown
void TearDown() override
Definition
embedder_test.cpp:282
ExternalEngineEmbedderTest
Definition
external_engine_embedder_test.h:19
ExternalEngineEmbedderTest::~ExternalEngineEmbedderTest
~ExternalEngineEmbedderTest() override
ExternalEngineEmbedderTest::ExternalEngineEmbedderTest
ExternalEngineEmbedderTest()
ExternalEngineEmbedderTest::SetUp
void SetUp() override
Definition
external_engine_embedder_test.cpp:19
ExternalEngineEmbedderTest::GetV8Context
v8::Local< v8::Context > GetV8Context()
Definition
external_engine_embedder_test.cpp:35
ExternalEngineEmbedderTest::TearDown
void TearDown() override
Definition
external_engine_embedder_test.cpp:29
FXJS_PerIsolateData
Definition
cfxjs_engine.h:41
JSEmbedderTest
Definition
js_embedder_test.h:14
JSEmbedderTest::isolate
v8::Isolate * isolate() const
Definition
js_embedder_test.cpp:13
qtwebengine
src
3rdparty
chromium
third_party
pdfium
testing
external_engine_embedder_test.cpp
Generated on Sat Sep 21 2024 01:00:03 for Qt by
1.12.0