pdf.js/test/unit
Tim van der Meij c7af2db2ec
Implement unit tests for the encodings and fix missing items
Initially I just implemented the unit tests, but quickly found that they
were failing my expectation of having a size of 256 items. Some of them
did contain 256 items and some did not. I looked up various resources
and figured that they indeed all need to have 256 items. One of the good
resources is https://github.com/davidben/poppler/blob/master/poppler/FontEncodingTables.cc

Aside from some missing `notdef` (empty string) entries at the end of
the arrays, which I assume causes issues since it may cause
out-of-bounds array access which in JavaScript gives `undefined`, there
was a `notdef` entry missing in the `MacExpertEncoding`, causing the
entries after that to be shifted. This fix for this is similar to the
one in #8589.

The unit tests verify that, for known encoding names, the return value
is not only an array, but that it is also of the right length and
contains only strings.
2017-12-24 18:14:40 +01:00
..
annotation_spec.js Sanitize the display value for choice widget annotations 2017-11-18 20:37:27 +01:00
api_spec.js Merge pull request #9034 from Snuffleupagus/javascript-null 2017-10-17 21:58:45 +02:00
bidi_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
cff_parser_spec.js Sanitize name index in compile phase of CFF. 2017-10-23 17:13:49 -07:00
clitests.json Implement unit tests for the encodings and fix missing items 2017-12-24 18:14:40 +01:00
cmap_spec.js Check that this.baseUrl is defined before attempting to fetch any data in DOMCMapReaderFactory/NodeCMapReaderFactory 2017-09-28 12:34:57 +02:00
colorspace_spec.js Split the existing PDFFunction in two classes, a private PDFFunction and a public PDFFunctionFactory, and utilize the latter in PDFDocument to allow various code to access the methods of PDFFunction` 2017-09-29 15:30:53 +02:00
crypto_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
custom_spec.js [api-major] Remove the PDFJS_NEXT option 2017-10-16 23:16:51 +02:00
display_svg_spec.js __non_webpack_require__ -> require in SystemJS 2017-08-15 12:14:30 +02:00
document_spec.js Split the existing PDFFunction in two classes, a private PDFFunction and a public PDFFunctionFactory, and utilize the latter in PDFDocument to allow various code to access the methods of PDFFunction` 2017-09-29 15:30:53 +02:00
dom_utils_spec.js Introduce DOMSVGFactory 2017-09-09 21:36:27 +02:00
encodings_spec.js Implement unit tests for the encodings and fix missing items 2017-12-24 18:14:40 +01:00
evaluator_spec.js Moves OperatorList and QueueOptimizer into separate file. 2017-10-30 13:29:58 -05:00
fonts_spec.js Move char codes from high surrogate pair range into private use. 2017-12-07 10:35:50 -08:00
function_spec.js Replace the isArray helper function with the native Array.isArray function 2017-09-01 20:27:13 +02:00
jasmine-boot.js Implement unit tests for the encodings and fix missing items 2017-12-24 18:14:40 +01:00
metadata_spec.js Handle broken, Ghostscript generated, Metadata that contains HTML character names (bug 1424938) 2017-12-13 14:32:47 +01:00
murmurhash3_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
network_spec.js Re-factor how parameters are passed to the network streams 2017-11-11 11:23:29 +01:00
network_utils_spec.js Implement unit tests for the network utility code 2017-12-23 19:24:11 +01:00
node_stream_spec.js Re-factor how parameters are passed to the network streams 2017-11-11 11:23:29 +01:00
parser_spec.js Ignore line-breaks between operator and digit in Lexer.getNumber 2017-05-02 20:59:42 +02:00
pdf_history_spec.js Fix a PDFHistory regression with document hashes of the nameddest=... form 2017-10-09 21:58:54 +02:00
primitives_spec.js Move the XRefMock in the unit tests to a central location 2017-07-29 15:16:19 +02:00
stream_spec.js Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
test_utils.js Check that this.baseUrl is defined before attempting to fetch any data in DOMCMapReaderFactory/NodeCMapReaderFactory 2017-09-28 12:34:57 +02:00
testreporter.js Enable the object-shorthand ESLint rule 2017-04-30 11:13:34 +02:00
type1_parser_spec.js Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
ui_utils_spec.js Slightly refactor the pages rotation handling code in the viewer 2017-09-09 11:27:05 +02:00
unicode_spec.js Convert the files in the /test/unit folder to ES6 modules 2017-04-30 00:34:02 +02:00
unit_test.html Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00
util_spec.js Use native Math functions in the custom log2 function 2017-12-10 16:35:17 +01:00
util_stream_spec.js Adds ready capability rejection logic for stream sink. 2017-07-25 02:07:38 +05:30