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