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_js_embedder_test.h
Go to the documentation of this file.
1// Copyright 2017 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#ifndef TESTING_XFA_JS_EMBEDDER_TEST_H_
6#define TESTING_XFA_JS_EMBEDDER_TEST_H_
7
8#include <string>
9
10#include "core/fxcrt/string_view_template.h"
11#include "testing/js_embedder_test.h"
12#include "v8/include/v8-local-handle.h"
13#include "v8/include/v8-persistent-handle.h"
14#include "v8/include/v8-value.h"
15
16class CFXJSE_Engine;
17class CXFA_Document;
18
20 public:
22 ~XFAJSEmbedderTest() override;
23
24 // EmbedderTest:
25 void SetUp() override;
26 void TearDown() override;
27 bool OpenDocumentWithOptions(const std::string& filename,
28 const char* password,
29 LinearizeOption linearize_option,
30 JavaScriptOption javascript_option) override;
31
32 CXFA_Document* GetXFADocument() const;
33 CFXJSE_Engine* GetScriptContext() const { return script_context_; }
34 v8::Local<v8::Value> GetValue() const;
35
36 bool Execute(ByteStringView input);
37 bool ExecuteSilenceFailure(ByteStringView input);
38
39 private:
40 bool ExecuteHelper(ByteStringView input);
41
42 v8::Global<v8::Value> value_;
43 CFXJSE_Engine* script_context_ = nullptr;
44};
45
46#endif // TESTING_XFA_JS_EMBEDDER_TEST_H_
friend class EventParamScope
Extension * GetExtension() const
v8::Local< v8::Value > GetValue() const
CXFA_Document * GetXFADocument() const
bool Execute(ByteStringView input)
bool OpenDocumentWithOptions(const std::string &filename, const char *password, LinearizeOption linearize_option, JavaScriptOption javascript_option) override
CFXJSE_Engine * GetScriptContext() const
~XFAJSEmbedderTest() override
bool ExecuteSilenceFailure(ByteStringView input)
TEST_F(CPDFXFAContextEmbedderTest, HasHeap)