Add JavasScript test for CJX_Container methods.
Change-Id: Ice6b87d1fad42cdd44173ffa021dd21359255a1e
Reviewed-on: https://pdfium-review.googlesource.com/c/50330
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/resources/javascript/xfa_specific/xfa_container.in b/testing/resources/javascript/xfa_specific/xfa_container.in
new file mode 100644
index 0000000..c950ac5
--- /dev/null
+++ b/testing/resources/javascript/xfa_specific/xfa_container.in
@@ -0,0 +1,41 @@
+{{header}}
+{{include ../../xfa_catalog_1_0.fragment}}
+{{include ../../xfa_object_2_0.fragment}}
+{{include ../../xfa_preamble_3_0.fragment}}
+{{include ../../xfa_config_4_0.fragment}}
+{{object 5 0}} <<
+>>
+stream
+<template>
+ <subform layout="tb" name="my_doc">
+ <pageSet id="page" relation="orderedOccurrence">
+ <occur initial="1" max="1" min="1"/>
+ <pageArea id="Page1" name="Page1">
+ <occur max="1" min="1"/>
+ <contentArea h="100mm" w="200mm" x="0.25in" y="0.25in"/>
+ </pageArea>
+ <pageArea id="Page2" name="Page2">
+ <occur max="1" min="1"/>
+ <contentArea h="100mm" w="200mm" x="0.25in" y="0.25in"/>
+ </pageArea>
+ </pageSet>
+ <event activity="docReady" ref="$host">
+ <script contentType="application/x-javascript">
+ {{include ../expect.js}}
+ expect("typeof my_doc.getDelta", "function");
+ expect("typeof my_doc.getDeltas", "function");
+ expect("my_doc.getDelta('args', 'not', 'checked')", undefined);
+ expect("my_doc.getDeltas('args', 'not', 'checked')", "[object XFAObject]");
+ </script>
+ </event>
+ </subform>
+</template>
+endstream
+endobj
+{{include ../../xfa_locale_6_0.fragment}}
+{{include ../../xfa_postamble_7_0.fragment}}
+{{include ../../xfa_pages_8_0.fragment}}
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/javascript/xfa_specific/xfa_container_expected.txt b/testing/resources/javascript/xfa_specific/xfa_container_expected.txt
new file mode 100644
index 0000000..c76d4d8
--- /dev/null
+++ b/testing/resources/javascript/xfa_specific/xfa_container_expected.txt
@@ -0,0 +1,4 @@
+Alert: PASS: typeof my_doc.getDelta = function
+Alert: PASS: typeof my_doc.getDeltas = function
+Alert: PASS: my_doc.getDelta('args', 'not', 'checked') = undefined
+Alert: PASS: my_doc.getDeltas('args', 'not', 'checked') = [object XFAObject]