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

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

Issue 1327473002: Fix two issues shown by bug 489995 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add test for addIcon() Created 5 years, 3 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Method is present. 115 // Method is present.
116 expect('typeof this.addIcon', 'function'); 116 expect('typeof this.addIcon', 'function');
117 117
118 // Method takes exactly two arguments. 118 // Method takes exactly two arguments.
119 expectError('this.addIcon()'); 119 expectError('this.addIcon()');
120 expectError('this.addIcon(1)'); 120 expectError('this.addIcon(1)');
121 expectError('this.addIcon(1, 2, 3)'); 121 expectError('this.addIcon(1, 2, 3)');
122 122
123 // Second argument must actually be an icon. 123 // Second argument must actually be an icon.
124 expectError('this.addIcon("myicon", 3)'); 124 expectError('this.addIcon("myicon", 3)');
125 expectError('this.addIcon("myicon", undefined)');
125 126
126 // TODO(tsepez): test success cases. 127 // TODO(tsepez): test success cases.
127 } 128 }
128 129
129 function testCalculateNow() { 130 function testCalculateNow() {
130 // Method is present. 131 // Method is present.
131 expect('typeof this.calculateNow', 'function'); 132 expect('typeof this.calculateNow', 'function');
132 133
133 // TODO(tsepez): test with no permissions. 134 // TODO(tsepez): test with no permissions.
134 // TODO(tsepez): test success cases. 135 // TODO(tsepez): test success cases.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 314 }
314 endstream 315 endstream
315 endobj 316 endobj
316 {{xref}} 317 {{xref}}
317 trailer << 318 trailer <<
318 /Root 1 0 R 319 /Root 1 0 R
319 /Info 9 0 R 320 /Info 9 0 R
320 >> 321 >>
321 {{startxref}} 322 {{startxref}}
322 %%EOF 323 %%EOF
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | testing/resources/javascript/document_methods_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698