pdf.js/test
Jonas Jenwald a39d636eb8 [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815)
Other PDF readers, e.g. Adobe Reader and PDFium (in Chrome), will attempt to render as much of a page as possible even if there are errors present.
Currently we just bail as soon the first error is hit, which means that we'll usually not render anything in these cases and just display a blank page instead.

NOTE: This patch changes the default behaviour of the PDF.js API to always attempt to recover as much data as possible, even when encountering errors during e.g. `getOperatorList`/`getTextContent`, which thus improve our handling of corrupt PDF files and allow the default viewer to handle errors slightly more gracefully.
In the event that an API consumer wishes to use the old behaviour, where we stop parsing as soon as an error is encountered, the `stopAtErrors` parameter can be set at `getDocument`.

Fixes, inasmuch it's possible since the PDF files are corrupt, e.g. issue 6342, issue 3795, and [bug 1130815](https://bugzilla.mozilla.org/show_bug.cgi?id=1130815) (and probably others too).
2017-04-11 08:59:22 +02:00
..
chromium Adjust the brace-style ESLint rule to disallow single lines (and also enable no-iterator) 2017-02-04 15:53:08 +01:00
features Remove usage of mozFillRule 2017-01-29 23:24:44 +01:00
font Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00
pdfs [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815) 2017-04-11 08:59:22 +02:00
resources Remove 'use strict'; causing failure and unused prefs. 2016-01-14 13:23:48 -08:00
stats Adjust the brace-style ESLint rule to disallow single lines (and also enable no-iterator) 2017-02-04 15:53:08 +01:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
unit Merge pull request #8157 from Snuffleupagus/api-RenderTask-cancel-Error 2017-04-04 09:38:47 -05:00
.eslintrc Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
annotation_layer_test.css Button widget annotations: improve unit tests, simplify code and remove labels 2016-12-17 20:38:48 +01:00
downloadutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
driver.js Actually skip pages included in the skipPages array when running tests, rather than creating empty 1x1 canvases (issue 8241) 2017-04-06 13:17:52 +02:00
test_manifest.json [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815) 2017-04-11 08:59:22 +02:00
test_slave.html Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00
test.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
testutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
text_layer_test.css Better "text" testing. 2015-11-19 11:03:52 -06:00
webbrowser.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
webserver.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00