Commit Graph

889 Commits

Author SHA1 Message Date
Yury Delendik
8206894d24 Merge pull request #5247 from Rob--W/wiki-test-link-gen
Fix links to wiki subsections and remove TextDecoder feature tests
2014-09-09 10:12:46 -05:00
Yury Delendik
aa8d3d98f8 Fetches params in makeFilter 2014-09-09 08:29:31 -05:00
Yury Delendik
a19790d653 Merge pull request #5235 from Snuffleupagus/remove-duplicate-test-file
Remove a duplicate PDF file from the test suite
2014-09-08 11:03:37 -05:00
Tim van der Meij
1d9dc37337 Merge pull request #5248 from Snuffleupagus/getStats-unit-test
Add getStats unit test
2014-09-05 19:17:43 +02:00
Jonas Jenwald
3ca2c3f4a7 Add ZapfDingbats testcase 2014-09-03 21:57:57 +02:00
Jonas Jenwald
fb7489ffd0 Add getStats unit test
Since some Telemetry data depends on `getStats`, having a unit test should make it more diffucult to accidentally break this without noticing.
2014-08-30 22:12:34 +02:00
Rob Wu
b57d35034c Remove TextDecoder feature tests
TextDecoder is not required by PDF.js any more, and the wiki entry has been deleted as well:
13ddaa9845...09aac34e58
2014-08-30 10:55:00 +02:00
Rob Wu
fe598d1a55 Update link-to-wiki generator 2014-08-30 10:51:50 +02:00
Jonas Jenwald
3152085b0d Remove a duplicate PDF file from the test suite
The files issue3115.pdf and issue2337.pdf are identical, the only difference being that the first one is an `eq` test and the second one a `load` test. Hence there is no reason to keep the `load` test, since it's just a subset of the `eq` test.
2014-08-24 16:23:25 +02:00
Yury Delendik
be998261cc Fixes Type3 negative font direction 2014-08-18 17:57:52 -05:00
Kalervo Kujala
0c5525dc8a CalRGB: optimize CalRGB calculations
Also fix one silly mistake.
2014-08-16 11:38:15 +03:00
Jonas Jenwald
9f1e140c4f Add unit test for PDF file loaded as typed array 2014-08-15 17:21:46 +02:00
Yury Delendik
fa8d385818 Merge pull request #5165 from kkujala/calrgb
implement CalRGB color space
2014-08-15 10:19:49 -05:00
Kalervo Kujala
1e4a7f981e implement CalRGB color space
Both whitespace and blackspace support are implemented.
2014-08-14 23:49:19 +03:00
Jonas Jenwald
b201cc4940 Remove the remaining references to cidmaps.js from the test suite 2014-08-14 12:42:57 +02:00
Jonas Jenwald
1fb404aff2 Fix CMap unit tests
When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation.
What's somewhat troubling here is that we currently have CMap unit tests that passes, *despite* not working as intended (the CMap files doesn't load).
2014-08-14 12:36:49 +02:00
Jonas Jenwald
06b5d97bc6 Remove two instances of leftover console.log debug statements
The `console.log` statement in evaluator_spec.js is obviously not needed. In obj.js it could have been replaced by `info`, but that seemed unnecessary given the already existing `error`.
2014-08-13 14:29:46 +02:00
Jonas Jenwald
c3691500fa Merge pull request #5172 from nnethercote/readCharCode-retval
Avoid an allocation in readCharCode().
2014-08-13 11:03:07 +02:00
Nicholas Nethercote
61e6b576d4 Avoid an allocation in readCharCode().
readCharCode() returns two values, and currently allocates a length-2
array on every call to do so. This change makes it instead us a
passed-in object which can be reused.

This tiny change reduces the total JS allocations done for the document
in Mozilla bug 992125 by 4.2%.
2014-08-12 16:12:58 -07:00
Jonas Jenwald
fc5ad8a8d6 Add even more unit tests for the API
This patch replaces most of the remaining TODOs in test/unit/api_spec.js with actual tests.
2014-08-12 12:09:31 +02:00
Yury Delendik
fa53fcbf57 Merge pull request #5095 from Snuffleupagus/issue-5070
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
2014-08-05 17:41:38 -05:00
Jonas Jenwald
cb4a847347 Merge pull request #5134 from yurydelendik/fun4
Improves speed of the functions
2014-08-05 23:51:03 +02:00
Yury Delendik
6865c284a7 Merge pull request #5111 from nnethercote/better-cidchars
Represent cid chars using integers, not strings.
2014-08-04 22:26:55 -05:00
Yury Delendik
f750e35224 Optimizes functions to not create arrays 2014-08-04 11:23:11 -05:00
Yury Delendik
cb81bd6be6 Compiles some of the FunctionType 4 2014-08-04 11:21:31 -05:00
Jonas Jenwald
8ecbb4da05 Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070) 2014-08-03 21:18:23 +02:00
Jonas Jenwald
70b934c7a5 Add reduced test-cases for issues 4875 and 4881 2014-08-03 18:34:52 +02:00
Jonas Jenwald
c0cbf5f458 Merge pull request #5109 from timvandermeij/strict-equalities-test
Use strict equalities in test/*
2014-08-01 13:27:25 +02:00
Nicholas Nethercote
adf58ed687 Represent cid chars using integers, not strings.
cid chars are 16-bit unsigned integers. Currently we convert them to
single-char strings when inserting them into the CMap, and then convert
them back to integers when extracting them from the CMap. This patch
changes CMap so that cid chars stay in integer format throughout, saving
both time and space.

When loading the PDF from issue #4580, this change reduces peak RSS from
~600 to ~370 MiB. It also improves overall speed on that PDF by ~26%,
going from 724 ms to 533 ms.
2014-08-01 02:35:17 -07:00
Tim van der Meij
b0349cd184 Use strict equalities in test/unit/{function_spec, stream_spec, testreporter}.js 2014-07-31 23:08:55 +02:00
Tim van der Meij
e525902241 Use strict equalities in test/driver.js 2014-07-31 23:08:54 +02:00
Jonas Jenwald
26f5b1b2d3 Add a couple of reduced test-cases for PR 4259
PR 4259 fixed a large number of font bugs, but none of those where added as test-cases. This was, in my opinion, unfortunate since it increases the risk of regressions in the future when other font bugs are fixed.
This PR simply adds a few more test-cases, to improve our test coverage somewhat.
2014-07-31 13:46:11 +02:00
Jonas Jenwald
50eeff2fab Add a reduced test-case for issue 4800 2014-07-30 22:15:06 +02:00
Yury Delendik
7026543663 Merge pull request #5059 from timvandermeij/unused-code
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05:00
Jonas Jenwald
e5f249605c Add a reduced test-case for bug 1027533 2014-07-29 16:48:01 +02:00
Jonas Jenwald
2485f11829 Fix loading of PDF files with invalid or missing Type3 characters (issue 5039) 2014-07-24 15:03:22 +02:00
Jonas Jenwald
f13c217b25 Fix another seac regression (issue 4801) 2014-07-22 21:44:13 +02:00
Yury Delendik
53320ce734 Merge pull request #5012 from Snuffleupagus/issue-5010
Prevent CMapFactory.create from failing by passing the necessary parameters from PartialEvaluator_readToUnicode (issue 5010)
2014-07-22 10:54:35 -05:00
Tim van der Meij
7586d777eb Enforcing JSHint's undef option 2014-07-19 16:41:07 +02:00
Tim van der Meij
34728ee49b Removing unused code 2014-07-18 22:34:50 +02:00
Jonas Jenwald
cbe097c0cb In the reftest analyzer, make it possible to toggle "Circle differences" with the D key
It's currently possible to step through the test results using the <kbd>N</kbd> and <kbd>P</kbd> keys, and you can also switch between test and reference images with the <kbd>T</kbd> key.
However if you want to highlight the differences, that can only be done by clicking. This has always annoyed me somewhat, so this patch adds support for toggling the differences view with the <kbd>D</kbd> key.
2014-07-16 12:21:32 +02:00
Jonas Jenwald
a7c786775d [CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881) 2014-07-05 00:18:51 +02:00
Jonas Jenwald
04975acceb Prevent CMapFactory.create from failing by passing the necessary parameters from PartialEvaluator_readToUnicode (issue 5010) 2014-06-27 00:46:16 +02:00
Yury Delendik
c28839b2f3 Merge pull request #4944 from Snuffleupagus/issue-4934
Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934)
2014-06-23 21:49:24 -05:00
Nicholas Nethercote
081866a184 Use null instead of [] for ops with no args.
This reduces peak RSS on one test file from ~600 to ~560 MiB.
2014-06-22 16:03:48 -07:00
Yury Delendik
bdeca30fbf Splits shared/annotation.js into core/ and display/ 2014-06-17 17:43:33 -05:00
pramodhkp
1d00e9d13c Added getOperatorList to api.js 2014-06-18 01:30:42 +05:30
Jonas Jenwald
158790981c Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934) 2014-06-14 22:59:08 +02:00
Yury Delendik
34298e4ba7 Adds test case for JPX COC marker 2014-06-13 18:22:42 -05:00
Daniel West
1fce2856c6 Added support for decrypting PDF 1.7/2.0 Algorithm 5 revision 5 and 6.
*Added AES128 Encryption
*Added AES258 Encryption/Decryption
*Added SHA256
*Added SHA512
*Added class to handle 8 byte integers and associated bit operations
*Added SHA384
*Added routines to handle new algorithm and perform PDF2.0 hashing.
2014-06-13 13:05:47 -05:00