| OLD | NEW |
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 function testCalculateNow() { | 129 function testCalculateNow() { |
| 130 // Method is present. | 130 // Method is present. |
| 131 expect('typeof this.calculateNow', 'function'); | 131 expect('typeof this.calculateNow', 'function'); |
| 132 | 132 |
| 133 // TODO(tsepez): test with no permissions. | 133 // TODO(tsepez): test with no permissions. |
| 134 // TODO(tsepez): test success cases. | 134 // TODO(tsepez): test success cases. |
| 135 } | 135 } |
| 136 | 136 |
| 137 function testDeletePages() { | |
| 138 // Method is present. | |
| 139 expect('typeof this.deletePages', 'function'); | |
| 140 | |
| 141 // TODO(tsepez): test with no permissions. | |
| 142 // TODO(tsepez): test success cases. | |
| 143 } | |
| 144 | |
| 145 function testGetField() { | 137 function testGetField() { |
| 146 // Method is present. | 138 // Method is present. |
| 147 expect('typeof this.getField', 'function'); | 139 expect('typeof this.getField', 'function'); |
| 148 | 140 |
| 149 // Method needs at least one argument. | 141 // Method needs at least one argument. |
| 150 expectError('this.getField()'); | 142 expectError('this.getField()'); |
| 151 | 143 |
| 152 // TODO(tsepez): test success cases. | 144 // TODO(tsepez): test success cases. |
| 153 } | 145 } |
| 154 | 146 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // Method is present. | 240 // Method is present. |
| 249 expect('typeof this.removeField', 'function'); | 241 expect('typeof this.removeField', 'function'); |
| 250 | 242 |
| 251 // Method requires at least one argument. | 243 // Method requires at least one argument. |
| 252 expectError('this.removeField()'); | 244 expectError('this.removeField()'); |
| 253 | 245 |
| 254 // TODO(tsepez): test with no permissions. | 246 // TODO(tsepez): test with no permissions. |
| 255 // TODO(tsepez): test success cases. | 247 // TODO(tsepez): test success cases. |
| 256 } | 248 } |
| 257 | 249 |
| 258 function testRemoveIcon() { | |
| 259 // Method is present. | |
| 260 expect('typeof this.removeIcon', 'function'); | |
| 261 | |
| 262 // Method requires at least one argument. | |
| 263 expectError('this.removeIcon()'); | |
| 264 | |
| 265 // TODO(tsepez): test success cases. | |
| 266 } | |
| 267 | |
| 268 function testResetForm() { | 250 function testResetForm() { |
| 269 // Method is present. | 251 // Method is present. |
| 270 expect('typeof this.resetForm', 'function'); | 252 expect('typeof this.resetForm', 'function'); |
| 271 | 253 |
| 272 // TODO(tsepez): test with no permissions. | 254 // TODO(tsepez): test with no permissions. |
| 273 // TODO(tsepez): test success cases. | 255 // TODO(tsepez): test success cases. |
| 274 } | 256 } |
| 275 | 257 |
| 276 function testSubmitForm() { | 258 function testSubmitForm() { |
| 277 // Method is present. | 259 // Method is present. |
| 278 expect('typeof this.submitForm', 'function'); | 260 expect('typeof this.submitForm', 'function'); |
| 279 | 261 |
| 280 // Method requires at least one argument. | 262 // Method requires at least one argument. |
| 281 expectError('this.submitForm()'); | 263 expectError('this.submitForm()'); |
| 282 | 264 |
| 283 // TODO(tsepez): test success cases. | 265 // TODO(tsepez): test success cases. |
| 284 } | 266 } |
| 285 | 267 |
| 286 try { | 268 try { |
| 287 app.alert('*** Testing Unsupported Methods ***'); | 269 app.alert('*** Testing Unsupported Methods ***'); |
| 288 testUnsupported('this.addAnnot'); | 270 testUnsupported('this.addAnnot'); |
| 289 testUnsupported('this.addField'); | 271 testUnsupported('this.addField'); |
| 290 testUnsupported('this.addLink'); | 272 testUnsupported('this.addLink'); |
| 291 testUnsupported('this.closeDoc'); | 273 testUnsupported('this.closeDoc'); |
| 292 testUnsupported('this.createDataObject'); | 274 testUnsupported('this.createDataObject'); |
| 275 testUnsupported('this.deletePages'); |
| 293 testUnsupported('this.exportAsFDF'); | 276 testUnsupported('this.exportAsFDF'); |
| 294 testUnsupported('this.exportAsText'); | 277 testUnsupported('this.exportAsText'); |
| 295 testUnsupported('this.exportAsXFDF'); | 278 testUnsupported('this.exportAsXFDF'); |
| 296 testUnsupported('this.extractPages'); | 279 testUnsupported('this.extractPages'); |
| 297 testUnsupported('this.getAnnot'); | 280 testUnsupported('this.getAnnot'); |
| 298 testUnsupported('this.getAnnot3D'); | 281 testUnsupported('this.getAnnot3D'); |
| 299 testUnsupported('this.getAnnots'); | 282 testUnsupported('this.getAnnots'); |
| 300 testUnsupported('this.getLinks'); | 283 testUnsupported('this.getLinks'); |
| 301 testUnsupported('this.getOCGs'); | 284 testUnsupported('this.getOCGs'); |
| 302 testUnsupported('this.getPageBox'); | 285 testUnsupported('this.getPageBox'); |
| 303 testUnsupported('this.getURL'); | 286 testUnsupported('this.getURL'); |
| 304 testUnsupported('this.importAnFDF'); | 287 testUnsupported('this.importAnFDF'); |
| 305 testUnsupported('this.importAnXFDF'); | 288 testUnsupported('this.importAnXFDF'); |
| 306 testUnsupported('this.importTextData'); | 289 testUnsupported('this.importTextData'); |
| 307 testUnsupported('this.insertPages'); | 290 testUnsupported('this.insertPages'); |
| 291 testUnsupported('this.removeIcon'); |
| 308 testUnsupported('this.replacePages'); | 292 testUnsupported('this.replacePages'); |
| 309 testUnsupported('this.saveAs'); | 293 testUnsupported('this.saveAs'); |
| 310 | 294 |
| 311 app.alert('*** Testing Supported Methods ***'); | 295 app.alert('*** Testing Supported Methods ***'); |
| 312 testAddIcon(); | 296 testAddIcon(); |
| 313 testCalculateNow(); | 297 testCalculateNow(); |
| 314 testDeletePages(); | |
| 315 testGetField(); | 298 testGetField(); |
| 316 testGetIcon(); | 299 testGetIcon(); |
| 317 testGetNthFieldName(); | 300 testGetNthFieldName(); |
| 318 testGetPageNthWord(); | 301 testGetPageNthWord(); |
| 319 testGetPageNthWordQuads(); | 302 testGetPageNthWordQuads(); |
| 320 testGetPageNumWords(); | 303 testGetPageNumWords(); |
| 321 testGetPrintParams(); | 304 testGetPrintParams(); |
| 322 testMailDoc(); | 305 testMailDoc(); |
| 323 testMailForm(); | 306 testMailForm(); |
| 324 testPrint(); | 307 testPrint(); |
| 325 testRemoveField(); | 308 testRemoveField(); |
| 326 testRemoveIcon(); | |
| 327 testResetForm(); | 309 testResetForm(); |
| 328 testSubmitForm(); | 310 testSubmitForm(); |
| 329 } catch (e) { | 311 } catch (e) { |
| 330 app.alert('FATAL: ' + e.toString()); | 312 app.alert('FATAL: ' + e.toString()); |
| 331 } | 313 } |
| 332 endstream | 314 endstream |
| 333 endobj | 315 endobj |
| 334 {{xref}} | 316 {{xref}} |
| 335 trailer << | 317 trailer << |
| 336 /Root 1 0 R | 318 /Root 1 0 R |
| 337 /Info 9 0 R | 319 /Info 9 0 R |
| 338 >> | 320 >> |
| 339 {{startxref}} | 321 {{startxref}} |
| 340 %%EOF | 322 %%EOF |
| OLD | NEW |