summaryrefslogtreecommitdiff
path: root/testing/xfa_js_embedder_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/xfa_js_embedder_test.cpp')
-rw-r--r--testing/xfa_js_embedder_test.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp
index 0fe4b7a624..995c0ed1d5 100644
--- a/testing/xfa_js_embedder_test.cpp
+++ b/testing/xfa_js_embedder_test.cpp
@@ -47,21 +47,24 @@ CXFA_Document* XFAJSEmbedderTest::GetXFADocument() {
return UnderlyingFromFPDFDocument(document())->GetXFADoc()->GetXFADoc();
}
-bool XFAJSEmbedderTest::OpenDocumentWithOptions(const std::string& filename,
- const char* password,
- bool must_linearize) {
- if (!EmbedderTest::OpenDocumentWithOptions(filename, password,
- must_linearize))
+bool XFAJSEmbedderTest::OpenDocumentWithOptions(
+ const std::string& filename,
+ const char* password,
+ LinearizeOption linearize_option,
+ JavaScriptOption javascript_option) {
+ // JS required for XFA.
+ ASSERT(javascript_option == JavaScriptOption::kEnableJavaScript);
+ if (!EmbedderTest::OpenDocumentWithOptions(
+ filename, password, linearize_option, javascript_option)) {
return false;
-
+ }
script_context_ = GetXFADocument()->GetScriptContext();
return true;
}
bool XFAJSEmbedderTest::Execute(const ByteStringView& input) {
- if (ExecuteHelper(input)) {
+ if (ExecuteHelper(input))
return true;
- }
CFXJSE_Value msg(GetIsolate());
value_->GetObjectPropertyByIdx(1, &msg);