pdf.js/test
Jonas Jenwald 01ab15a6f1 [api-minor] Let Catalog_getPageIndex check that the Ref actually points to a /Page dictionary
Currently the `getPageIndex` method will happily return `0`, even if the `Ref` parameter doesn't actually point to a proper /Page dictionary.
Having the API trust that the consumer is doing the right thing seems error-prone, hence this patch which adds a check for this case.

Given that the `Catalog_getPageIndex` method isn't used in any hot part of the codebase, this extra check shouldn't be a problem.
(Note: in the standard viewer, it is only ever used from `PDFLinkService_navigateTo` if a destination needs to be resolved during document loading, which isn't common enough to be an issue IMHO.)
2016-05-21 14:13:41 +02:00
..
features Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
font Updates Jasmine version. 2016-03-29 09:34:13 -05:00
pdfs Attempt to combine text runs positioned with setTextMatrix 2016-05-18 17:21:58 +02:00
resources Remove 'use strict'; causing failure and unused prefs. 2016-01-14 13:23:48 -08:00
stats cleaned whitespace 2015-02-17 11:07:37 -05:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
unit [api-minor] Let Catalog_getPageIndex check that the Ref actually points to a /Page dictionary 2016-05-21 14:13:41 +02:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
annotation_layer_test.css Merge pull request #6807 from timvandermeij/popup-annotation-hidden 2015-12-28 22:58:41 +01:00
downloadutils.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
driver.js Remove combineUrl and replace it with new URL. 2016-04-15 21:33:10 +05:30
test_manifest.json Attempt to combine text runs positioned with setTextMatrix 2016-05-18 17:21:58 +02:00
test_slave.html Move all PDFJS.xxx settings into display/global. 2016-04-07 13:46:07 -05:00
test.js Allow unit-tests to use linked PDF files, by having the unittest command download unavailable ones (issue 7117) 2016-03-27 13:17:55 +02:00
testutils.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
text_layer_test.css Better "text" testing. 2015-11-19 11:03:52 -06:00
webbrowser.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
webserver.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30