1{{header}}
2{{object 1 0}} <<
3  /Type /Catalog
4  /Pages 2 0 R
5  /AcroForm << /Fields [ 4 0 R 10 0 R ] /DR 5 0 R >>
6>>
7endobj
8{{object 2 0}} <<
9  /Count 1
10  /Kids [ 3 0 R ]
11  /Type /Pages
12>>
13endobj
14{{object 3 0}} <<
15  /Type /Page
16  /Parent 2 0 R
17  /Resources 5 0 R
18  /MediaBox [ 0 0 300 200 ]
19  /Contents 8 0 R
20  /Annots [ 4 0 R 10 0 R ]
21>>
22endobj
23{{object 4 0}} <<
24  /Type /Annot
25  /FT /Tx
26  /T (Text Box)
27  /DA (0 0 0 rg /F1 12 Tf)
28  /Rect [ 100 100 200 130 ]
29  /Subtype /Widget
30  /AA <<
31    /F 9 0 R
32  >>
33>>
34endobj
35{{object 5 0}} <<
36  /Font 6 0 R
37>>
38endobj
39{{object 6 0}} <<
40  /F1 7 0 R
41>>
42endobj
43{{object 7 0}} <<
44  /Type /Font
45  /Subtype /Type1
46  /BaseFont /Helvetica
47>>
48endobj
49{{object 8 0}} <<
50  {{streamlen}}
51>>
52stream
53endstream
54endobj
55{{object 9 0}} <<
56  /JS (
57    {{include expect.js}}
58
59    try {
60      app.alert("*** starting test ***");
61
62      expect("event.change", "");
63      expect("event.change = 'boo'", "boo");
64      expect("event.change", "boo");
65
66      expect("event.changeEx", "");
67      expectError("event.changeEx = 'boo'");
68
69      expect("event.commitKey", "");
70      expectError("event.commitKey = 'boo'");
71
72      // FieldFull applies to events named Keystroke only.
73      // TODO(tsepez): figure out a way to set event names for tests.
74      expectError("event.fieldFull");
75      expectError("event.fieldFull = 'boo'");
76
77      expect("event.keyDown", "");
78      expectError("event.keyDown = 'boo'");
79
80      expect("event.modifier", "");
81      expectError("event.modifier = 'boo'");
82
83      expect("event.name", "Format");
84      expectError("event.name = 'boo'");
85
86      expect("event.rc", false);
87      expect("event.rc = 'boo'", "boo");
88      expect("event.rc", true);
89      expect("event.rc = false", false);
90
91      // TODO(tsepez): is silently ignoring update correct here?
92      expect("event.richChange", undefined);
93      expect("event.richChange = 'boo'", "boo");
94      expect("event.richChange", undefined);
95
96      // TODO(tsepez): is silently ignoring update correct here?
97      expect("event.richChangeEx", undefined);
98      expect("event.richChangeEx = 'boo'", "boo");
99      expect("event.richChangeEx", undefined);
100
101      // TODO(tsepez): is silently ignoring update correct here?
102      expect("event.richValue", undefined);
103      expect("event.richValue = 'boo'", "boo");
104      expect("event.richValue", undefined);
105
106      // selEnd applies to events named Keystroke only.
107      // TODO(tsepez): figure out a way to set event names for tests.
108      expect("event.selEnd", undefined);
109      expect("event.selEnd = 'boo'", "boo");
110      expect("event.selEnd", undefined);
111
112      // selEnd applies to events named Keystroke only.
113      // TODO(tsepez): figure out a way to set event names for tests.
114      expect("event.selStart", undefined);
115      expect("event.selStart = 'boo'", "boo");
116      expect("event.selStart", undefined);
117
118      expect("event.shift", false);
119      expectError("event.shift = 'boo'");
120
121      // TODO(tsepez): dig deeper into object.
122      expect("event.source", "[object Object]");
123      expectError("event.source = 'boo'");
124
125      // TODO(tsepez): dig deeper into object.
126      expect("event.target", "[object Object]");
127      expectError("event.target = 'boo'");
128
129      expect("event.targetName", "Text Box");
130      expectError("event.targetName = 'boo'");
131
132      expect("event.type", "Field");
133      expectError("event.type = 'boo'");
134
135      expect("event.value", "");
136      expect("event.value = 'boo'", "boo");
137      expect("event.value", "boo");
138      expect("event.value = ''", "");
139      expect("event.value", "");
140      expect("event.value = 0", 0);
141      expect("event.value", 0);
142      expect("event.value = 2", 2);
143      expect("event.value", 2);
144      expectError("event.value = true");
145      expectError("event.value = false");
146      expectError("event.value = undefined");
147      expectError("event.value = null");
148
149      expect("event.willCommit", true);
150      expectError("event.willCommit = 'boo'");
151      expect("event.willCommit", true);
152
153      app.alert("*** ending test ***");
154    } catch (e) {
155      app.alert("Truly unexpected error occured: " + e);
156    }
157  )
158  /S /JavaScript
159>>
160endobj
161{{object 10 0}} <<
162  /Type /Annot
163  /FT /Tx
164  /T (Text2)
165  /DA (0 0 0 rg /F1 12 Tf)
166  /Rect [ 100 40 200 70 ]
167  /Subtype /Widget
168>>
169endobj
170{{xref}}
171{{trailer}}
172{{startxref}}
173%%EOF
174