diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-22 20:20:57 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-22 20:20:57 +0000 |
commit | d3a34fe4665eed1ff09a5d06e565ffefb9a26134 (patch) | |
tree | 5e7b86471e2e74179860882d2c89b438caf6cb20 /testing | |
parent | 1d78f4dd34637bf9a16411f64816ef87cb128165 (diff) | |
download | pdfium-d3a34fe4665eed1ff09a5d06e565ffefb9a26134.tar.xz |
Add FPDFFormFillEmbeddertest.DocumentAActions.
Provides coverage for CJS_EventContext::OnDoc_* methods.
Change-Id: I65dff8fe5af4a9c11ac8fffabe209ad497586b1c
Reviewed-on: https://pdfium-review.googlesource.com/c/44392
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/resources/document_aactions.in | 139 | ||||
-rw-r--r-- | testing/resources/document_aactions.pdf | 164 |
2 files changed, 303 insertions, 0 deletions
diff --git a/testing/resources/document_aactions.in b/testing/resources/document_aactions.in new file mode 100644 index 0000000000..5c7ceed497 --- /dev/null +++ b/testing/resources/document_aactions.in @@ -0,0 +1,139 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R + /AcroForm 3 0 R + /AA 11 0 R +>> +endobj +{{object 2 0}} << + /Type /Pages + /Count 3 + /Kids [4 0 R] +>> +endobj +{{object 3 0}} << + /CO [9 0 R] + /Fields [ + 9 0 R + 7 0 R + ] +>> +endobj +{{object 4 0}} << + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 612 792] +>> +endobj +{{object 7 0}} << + /FT /Tx + /Type /Annot + /Subtype /Widget + /T (txtName2) + /F 4 + /AP <</N 8 0 R>> + /Rect [20 20 400 60] +>> +endobj +{{object 8 0}} << + /Type /XObject + /Subtype /Form + /FormType 1 +>> +endobj +{{object 9 0}} << + /FT /Tx + /Type /Annot + /Subtype /Widget + /T (txtName1) + /F 4 + /AP <</N 10 0 R>> + /Rect [200 200 400 260] +>> +endobj +{{object 10 0}} << + /Type /XObject + /Subtype /Form + /FormType 1 +>> +endobj +{{object 11 0}} << + /WP 14 0 R + /DP 16 0 R + /WS 18 0 R + /DS 20 0 R +>> +endobj +{{object 12 0}} << + /Type /Action + /S /JavaScript + /JS 13 0 R +>> +endobj +{{object 13 0}} << + {{streamlen}} +>> +stream +app.alert('Will Close'); +endstream +endobj +{{object 14 0}} << + /Type /Action + /S /JavaScript + /JS 15 0 R +>> +endobj +{{object 15 0}} << + {{streamlen}} +>> +stream +app.alert('Will Print'); +endstream +endobj +{{object 16 0}} << + /Type /Action + /S /JavaScript + /JS 17 0 R +>> +endobj +{{object 17 0}} << + {{streamlen}} +>> +stream +app.alert('Did Print'); +endstream +endobj +{{object 18 0}} << + /Type /Action + /S /JavaScript + /JS 19 0 R +>> +endobj +{{object 19 0}} << + {{streamlen}} +>> +stream +app.alert('Will Save'); +endstream +endobj +{{object 20 0}} << + /Type /Action + /S /JavaScript + /JS 21 0 R +>> +endobj +{{object 21 0}} << + {{streamlen}} +>> +stream +app.alert('Did Save'); +endstream +endobj +{{xref}} +trailer << + /Size 14 + /Root 1 0 R +>> +{{startxref}} +%%EOF diff --git a/testing/resources/document_aactions.pdf b/testing/resources/document_aactions.pdf new file mode 100644 index 0000000000..b921772672 --- /dev/null +++ b/testing/resources/document_aactions.pdf @@ -0,0 +1,164 @@ +%PDF-1.7 +% ò¤ô +1 0 obj << + /Type /Catalog + /Pages 2 0 R + /AcroForm 3 0 R + /AA 11 0 R +>> +endobj +2 0 obj << + /Type /Pages + /Count 3 + /Kids [4 0 R] +>> +endobj +3 0 obj << + /CO [9 0 R] + /Fields [ + 9 0 R + 7 0 R + ] +>> +endobj +4 0 obj << + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 612 792] +>> +endobj +7 0 obj << + /FT /Tx + /Type /Annot + /Subtype /Widget + /T (txtName2) + /F 4 + /AP <</N 8 0 R>> + /Rect [20 20 400 60] +>> +endobj +8 0 obj << + /Type /XObject + /Subtype /Form + /FormType 1 +>> +endobj +9 0 obj << + /FT /Tx + /Type /Annot + /Subtype /Widget + /T (txtName1) + /F 4 + /AP <</N 10 0 R>> + /Rect [200 200 400 260] +>> +endobj +10 0 obj << + /Type /XObject + /Subtype /Form + /FormType 1 +>> +endobj +11 0 obj << + /WP 14 0 R + /DP 16 0 R + /WS 18 0 R + /DS 20 0 R +>> +endobj +12 0 obj << + /Type /Action + /S /JavaScript + /JS 13 0 R +>> +endobj +13 0 obj << + /Length 25 +>> +stream +app.alert('Will Close'); +endstream +endobj +14 0 obj << + /Type /Action + /S /JavaScript + /JS 15 0 R +>> +endobj +15 0 obj << + /Length 25 +>> +stream +app.alert('Will Print'); +endstream +endobj +16 0 obj << + /Type /Action + /S /JavaScript + /JS 17 0 R +>> +endobj +17 0 obj << + /Length 24 +>> +stream +app.alert('Did Print'); +endstream +endobj +18 0 obj << + /Type /Action + /S /JavaScript + /JS 19 0 R +>> +endobj +19 0 obj << + /Length 24 +>> +stream +app.alert('Will Save'); +endstream +endobj +20 0 obj << + /Type /Action + /S /JavaScript + /JS 21 0 R +>> +endobj +21 0 obj << + /Length 23 +>> +stream +app.alert('Did Save'); +endstream +endobj +xref +0 22 +0000000000 65535 f +0000000015 00000 n +0000000099 00000 n +0000000162 00000 n +0000000233 00000 n +0000000000 65535 f +0000000000 65535 f +0000000310 00000 n +0000000440 00000 n +0000000509 00000 n +0000000643 00000 n +0000000713 00000 n +0000000787 00000 n +0000000855 00000 n +0000000932 00000 n +0000001000 00000 n +0000001077 00000 n +0000001145 00000 n +0000001221 00000 n +0000001289 00000 n +0000001365 00000 n +0000001433 00000 n +trailer << + /Size 14 + /Root 1 0 R +>> +startxref +1508 +%%EOF |