From d3a34fe4665eed1ff09a5d06e565ffefb9a26134 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 22 Oct 2018 20:20:57 +0000 Subject: 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 Commit-Queue: Tom Sepez --- testing/resources/document_aactions.in | 139 +++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 testing/resources/document_aactions.in (limited to 'testing/resources/document_aactions.in') 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 <> + /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 <> + /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 -- cgit v1.2.3