Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1956)

Side by Side Diff: testing/resources/javascript/document_methods.in

Issue 2260663002: Add initial Document::getAnnot support (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix GYP build Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pdfium.gyp ('k') | testing/resources/javascript/document_methods_expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {{header}} 1 {{header}}
2 {{object 1 0}} << 2 {{object 1 0}} <<
3 /Type /Catalog 3 /Type /Catalog
4 /Pages 2 0 R 4 /Pages 2 0 R
5 /OpenAction 10 0 R 5 /OpenAction 10 0 R
6 >> 6 >>
7 endobj 7 endobj
8 {{object 2 0}} << 8 {{object 2 0}} <<
9 /Type /Pages 9 /Type /Pages
10 /Count 4 10 /Count 4
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 129
130 function testCalculateNow() { 130 function testCalculateNow() {
131 // Method is present. 131 // Method is present.
132 expect('typeof this.calculateNow', 'function'); 132 expect('typeof this.calculateNow', 'function');
133 133
134 // TODO(tsepez): test with no permissions. 134 // TODO(tsepez): test with no permissions.
135 // TODO(tsepez): test success cases. 135 // TODO(tsepez): test success cases.
136 } 136 }
137 137
138 function testGetAnnot() {
139 // Method is present.
140 expect('typeof this.getAnnot', 'function');
141
142 // Method needs two arguments.
143 expectError('this.getAnnot()');
144 expectError('this.getAnnot(0)');
145 expectError('this.getAnnot(0, "test", 0)');
146
147 // TODO(tonikitoo): test success cases.
148 }
149
138 function testGetField() { 150 function testGetField() {
139 // Method is present. 151 // Method is present.
140 expect('typeof this.getField', 'function'); 152 expect('typeof this.getField', 'function');
141 153
142 // Method needs at least one argument. 154 // Method needs at least one argument.
143 expectError('this.getField()'); 155 expectError('this.getField()');
144 156
145 // TODO(tsepez): test success cases. 157 // TODO(tsepez): test success cases.
146 } 158 }
147 159
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 testUnsupported('this.addAnnot'); 294 testUnsupported('this.addAnnot');
283 testUnsupported('this.addField'); 295 testUnsupported('this.addField');
284 testUnsupported('this.addLink'); 296 testUnsupported('this.addLink');
285 testUnsupported('this.closeDoc'); 297 testUnsupported('this.closeDoc');
286 testUnsupported('this.createDataObject'); 298 testUnsupported('this.createDataObject');
287 testUnsupported('this.deletePages'); 299 testUnsupported('this.deletePages');
288 testUnsupported('this.exportAsFDF'); 300 testUnsupported('this.exportAsFDF');
289 testUnsupported('this.exportAsText'); 301 testUnsupported('this.exportAsText');
290 testUnsupported('this.exportAsXFDF'); 302 testUnsupported('this.exportAsXFDF');
291 testUnsupported('this.extractPages'); 303 testUnsupported('this.extractPages');
292 testUnsupported('this.getAnnot');
293 testUnsupported('this.getAnnot3D'); 304 testUnsupported('this.getAnnot3D');
294 testUnsupported('this.getAnnots'); 305 testUnsupported('this.getAnnots');
295 testUnsupported('this.getLinks'); 306 testUnsupported('this.getLinks');
296 testUnsupported('this.getOCGs'); 307 testUnsupported('this.getOCGs');
297 testUnsupported('this.getPageBox'); 308 testUnsupported('this.getPageBox');
298 testUnsupported('this.getURL'); 309 testUnsupported('this.getURL');
299 testUnsupported('this.importAnFDF'); 310 testUnsupported('this.importAnFDF');
300 testUnsupported('this.importAnXFDF'); 311 testUnsupported('this.importAnXFDF');
301 testUnsupported('this.importTextData'); 312 testUnsupported('this.importTextData');
302 testUnsupported('this.insertPages'); 313 testUnsupported('this.insertPages');
303 testUnsupported('this.removeIcon'); 314 testUnsupported('this.removeIcon');
304 testUnsupported('this.replacePages'); 315 testUnsupported('this.replacePages');
305 testUnsupported('this.saveAs'); 316 testUnsupported('this.saveAs');
306 317
307 app.alert('*** Testing Supported Methods ***'); 318 app.alert('*** Testing Supported Methods ***');
308 testAddIcon(); 319 testAddIcon();
309 testCalculateNow(); 320 testCalculateNow();
321 testGetAnnot();
310 testGetField(); 322 testGetField();
311 testGetIcon(); 323 testGetIcon();
312 testGetNthFieldName(); 324 testGetNthFieldName();
313 testGetPageNthWord(); 325 testGetPageNthWord();
314 testGetPageNthWordQuads(); 326 testGetPageNthWordQuads();
315 testGetPageNumWords(); 327 testGetPageNumWords();
316 testGetPrintParams(); 328 testGetPrintParams();
317 testGotoNamedDest(); 329 testGotoNamedDest();
318 testMailDoc(); 330 testMailDoc();
319 testMailForm(); 331 testMailForm();
320 testPrint(); 332 testPrint();
321 testRemoveField(); 333 testRemoveField();
322 testResetForm(); 334 testResetForm();
323 testSubmitForm(); 335 testSubmitForm();
324 } catch (e) { 336 } catch (e) {
325 app.alert('FATAL: ' + e.toString()); 337 app.alert('FATAL: ' + e.toString());
326 } 338 }
327 endstream 339 endstream
328 endobj 340 endobj
329 {{xref}} 341 {{xref}}
330 trailer << 342 trailer <<
331 /Root 1 0 R 343 /Root 1 0 R
332 /Info 9 0 R 344 /Info 9 0 R
333 >> 345 >>
334 {{startxref}} 346 {{startxref}}
335 %%EOF 347 %%EOF
OLDNEW
« no previous file with comments | « pdfium.gyp ('k') | testing/resources/javascript/document_methods_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698