summaryrefslogtreecommitdiff
path: root/testing/resources/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/javascript')
-rw-r--r--testing/resources/javascript/bug_735912.in115
-rw-r--r--testing/resources/javascript/bug_735912_expected.txt2
2 files changed, 117 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
diff --git a/testing/resources/javascript/bug_735912_expected.txt b/testing/resources/javascript/bug_735912_expected.txt
new file mode 100644
index 0000000000..7d0f42f517
--- /dev/null
+++ b/testing/resources/javascript/bug_735912_expected.txt
@@ -0,0 +1,2 @@
+Alert: removed
+Alert: focused