summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp
index 7902bb7c8d..ff2e200186 100644
--- a/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext_embeddertest.cpp
@@ -1432,3 +1432,15 @@ TEST_F(FM2JSContextEmbedderTest, Post) {
TEST_F(FM2JSContextEmbedderTest, Put) {
// TODO(dsinclair): Is this supported?
}
+
+TEST_F(FM2JSContextEmbedderTest, InvalidFunctions) {
+ ASSERT_TRUE(OpenDocument("simple_xfa.pdf"));
+
+ const char* const tests[] = {
+ "F()", "()", "()()()", "Round(2.0)()",
+ };
+
+ for (size_t i = 0; i < FX_ArraySize(tests); ++i) {
+ EXPECT_FALSE(ExecuteSilenceFailure(tests[i]));
+ }
+}