diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-07-24 11:38:31 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-24 19:42:23 +0000 |
commit | bfa2a97ca9f5026ceb8e8c2ce23cfc3c3e8b38a1 (patch) | |
tree | a97d91eb40560bae12721841a8fa6985aab42d8f /testing/resources/javascript/bug_735912.in | |
parent | 585f4f0828d2bef2ea132a19e28f21af67bb6bdd (diff) | |
download | pdfium-bfa2a97ca9f5026ceb8e8c2ce23cfc3c3e8b38a1.tar.xz |
Observe Annot destruction in CPDFSDK_PageView::DeleteAnnot
Run test XFA-Only, since that's where the issue occurs, and the
textual output is different for non-xfa. Fix a few lifetime issue
in pdfium_test.cc unearthed by this test (doc must outlive pages
now held in formfill info).
Bug: 735912
Change-Id: Icc9e6a967c32ece67d897117896c973bb16a1515
Reviewed-on: https://pdfium-review.googlesource.com/8510
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/resources/javascript/bug_735912.in')
-rw-r--r-- | testing/resources/javascript/bug_735912.in | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/testing/resources/javascript/bug_735912.in b/testing/resources/javascript/bug_735912.in new file mode 100644 index 0000000000..7f42d1b7c2 --- /dev/null +++ b/testing/resources/javascript/bug_735912.in @@ -0,0 +1,115 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R + /AcroForm 4 0 R + /OpenAction 30 0 R +>> +endobj +{{object 2 0}} << + /Type /Pages + /Count 1 + /Kids [ + 3 0 R + ] +>> +endobj +% Page number 0. +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /Annots [ + 8 0 R + ] + /AA << /C 36 0 R >> +>> +endobj +% Forms +{{object 4 0}} << + /XFA [ + (xdp:xdp) 43 0 R + (form) 49 0 R + (</xdp:xdp>) 50 0 R + ] + /Fields [ + 8 0 R + ] +>> +endobj +% Fields +{{object 8 0}} << + /FT /Tx + /T (MyField) + /Type /Annot + /Subtype /Widget + /Rect [100 300 500 400] + /AA << /Bl 34 0 R >> +>> +endobj +% JS Action +{{object 30 0}} << + /Type /Action + /S /JavaScript + /JS 31 0 R +>> +endobj +% JS program to exexute +{{object 31 0}} << +>> +stream +this.getField("MyField").setFocus(); +app.alert("focused"); +endstream +endobj +% Lost Focus AAction MyField +{{object 34 0}} << + /Type /Action + /S /JavaScript + /JS 35 0 R +>> +endobj +% JS program to exexute +{{object 35 0}} << +>> +stream +this.removeField("MyField"); +app.alert("removed"); +endstream +endobj +% Closing Page 0 +{{object 36 0}} << + /Type /Action + /S /JavaScript + /JS 37 0 R +>> +endobj +% JS program to exexute +{{object 37 0}} << +>> +stream +this.removeField("MyField"); +endstream +endobj +{{object 43 0}} << +>>stream +<?xml version="1.0" encoding="UTF-8"?> +<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/"> +endstream +endobj +{{object 49 0}} << +>>stream +<config></config> +<template></template> +endstream +endobj +{{object 50 0}} << +>>stream +</xdp:xdp> +endstream +endobj +{{xref}} +trailer << + /Root 1 0 R +>> +{{startxref}} +%%EOF |