Commit Graph

809 Commits

Author SHA1 Message Date
mduan
eb8f4e8343 Handle some illegal characters in hex string
Do not throw exception when hex strings are in the wrong format

Currently pdf.js is throwing an exception for the following hex string:

`<7 0 2 15 5 2 2 2 4 3 2 4>`

The issue is that the 15 is not a valid hex character so pdf.js ends up
throwing an exception.

This diff changes the parser to process the above hex string as follow:

`70 21 55 2 24 32` (Note: the final 4 of the hex string is ignored)

replicating the behaviour of MuPDF, and doesn't throw an exception.
2013-01-08 15:29:24 -08:00
khodzha
18da086b96 fix of combineUrl(baseUrl, url) in case of url - null, empty, undefined + unittests 2012-11-24 04:25:49 +04:00
Yury Delendik
4c0f9eb924 Fixes getNumber at the end of stream 2012-10-24 10:47:16 -05:00
Brendan Dahl
66563d0f95 Increase wait timeout for api unit tests. 2012-10-15 11:37:50 -07:00
Yury Delendik
e32ecc44d3 Fixes CFF test and CFF int16 parsing 2012-08-29 12:58:12 -05:00
Yury Delendik
0dd445bf18 Fixes unit tests and adds few for util.js 2012-06-23 15:35:59 -05:00
Yury Delendik
43f1946c7a Add prefixes for literals 2012-05-20 14:05:23 -05:00
Yury Delendik
ec6c185cf5 Allow parsing of the "glued" commands 2012-05-20 13:44:03 -05:00
Brendan Dahl
60dd0e08e4 Merge pull request #1694 from yurydelendik/owner-password
Fixes user and owner passwords logic
2012-05-15 11:52:56 -07:00
Yury Delendik
910ba0b91f Fixes user and owner passwords logic 2012-05-12 21:34:32 -05:00
Yury Delendik
324b867183 Adds evaluator tests 2012-05-10 16:11:27 -05:00
Yury Delendik
f7ccb291f4 Fix broken metadata 2012-04-23 16:43:20 -05:00
Yury Delendik
8b7cd47798 Merge pull request #1580 from brendandahl/unittest
Use test.py for unit tests too.
2012-04-23 12:42:44 -07:00
Brendan Dahl
909951d975 Allow time to finish requests. 2012-04-19 14:19:08 -07:00
Brendan Dahl
5f17d881a9 Fix nit. 2012-04-19 12:34:50 -07:00
Brendan Dahl
e18a2c512e Use test.py for unit tests too. 2012-04-19 12:32:24 -07:00
Brendan Dahl
e5732f489d Handle junk at the end of postscript functions. 2012-04-18 09:48:28 -07:00
Brendan Dahl
19c0c6a983 Add back other unit tests. Disable worker. 2012-04-12 18:09:25 -07:00
Brendan Dahl
3925e37417 Add basic api unit testing. 2012-04-12 17:59:30 -07:00
Brendan Dahl
1a1767ce82 Fix lint. 2012-03-10 19:47:14 -08:00
Brendan Dahl
386ea373a5 Add font spec to the unit test list. 2012-03-10 19:19:00 -08:00
Brendan Dahl
ce53b1b018 CFF Parser and Compiler. 2012-03-10 19:12:33 -08:00
Adil Allawi
b50cf76ab5 Properly integrate new file bidi.js 2012-02-13 14:56:37 +00:00
Kalervo Kujala
58107b1958 Add crypto and stream specs to test runner configuration. 2012-01-10 19:35:26 +02:00
Kalervo Kujala
0c50d14f38 Merge remote-tracking branch 'upstream/master' into dev
Conflicts:
	test/unit/unit_test.html
2012-01-10 19:27:51 +02:00
Kalervo Kujala
91c935180e Use correct default rule for unit test. 2012-01-10 19:21:43 +02:00
Kalervo Kujala
aeaaea35a8 Create debug option for the unit test makefile. 2012-01-09 20:51:30 +02:00
Kalervo Kujala
37d2d82f59 Merge remote-tracking branch 'upstream/master' into dev 2012-01-09 20:39:05 +02:00
notmasteryet
50a16573ad Add unit tests for calculateMD5, ARCFourCipher, and PredictorStream 2012-01-08 18:26:01 -06:00
Kalervo Kujala
f975f929f5 Add Unit tests for RefSet. 2012-01-07 22:22:22 +02:00
Kalervo Kujala
075d2d9cbf Add new unit tests to jsTestDriver.conf. 2012-01-05 21:23:07 +02:00
Kalervo Kujala
09eed8d971 Merge remote-tracking branch 'upstream/master' into dev
Conflicts:
	Makefile
	test/unit/unit_test.html
2012-01-05 21:16:15 +02:00
Kalervo Kujala
678b7dcd04 Use absolute paths in profiles for unit test. 2012-01-05 20:58:35 +02:00
Kalervo Kujala
71494bbab5 Find profile dirs in a better way for unit test. 2012-01-04 22:40:43 +02:00
Kalervo Kujala
d2a67eda78 Separate browsers correctly with newlines.
Also simplify $$RANDOM handling.
2012-01-04 22:24:58 +02:00
notmasteryet
c0cf081ec0 Merge pull request #994 from brendandahl/type4func
Type4 PostScript Functions
2011-12-30 16:05:49 -08:00
Brendan Dahl
9de52f375d Fix idiv and cvi. Add test case for idiv. 2011-12-30 13:25:34 -08:00
Brendan Dahl
6afb49c6c6 Address Yury's PR comments. 2011-12-30 09:24:13 -08:00
Brendan Dahl
20dace0513 Switch to a single "code stack". 2011-12-29 13:41:54 -08:00
Kalervo Kujala
0e2fb810c5 Refactor obj.js unit tests to be aligned with code. 2011-12-29 14:06:06 +02:00
Brendan Dahl
27b0d0c941 Switch to two arrays for instructions. 2011-12-28 20:08:18 -08:00
Kalervo Kujala
84d6a121af Add basic unit tests for obj.js. 2011-12-28 23:20:04 +02:00
Kalervo Kujala
58a2919ef7 Separate unit test Makefile commands to separate variables for readability.
Also add more debug info for the make.
2011-12-27 23:58:26 +02:00
Brendan Dahl
971f35d165 Add unit files to lint, fix lint errors. 2011-12-23 21:19:15 -08:00
Brendan Dahl
1089c30b56 Adding type4 postscript function support. 2011-12-23 19:41:12 -08:00
Kalervo Kujala
43b57f9e49 Add debug logging to unit test Makefile. 2011-12-22 22:33:16 +02:00
Kalervo Kujala
d741a8a7aa Set the Makefile variables correctly for unit test. 2011-12-21 01:21:15 +02:00
Kalervo Kujala
3a55c1c8b9 Create the profile directories beforehand for unit test. 2011-12-21 01:15:51 +02:00
Kalervo Kujala
86663408f0 Use simpler sed and random temp profile names for unit test. 2011-12-16 00:23:23 +02:00
Kalervo Kujala
75c9286a20 Add unit test support for Google Chrome for Windows. 2011-12-15 00:55:00 +02:00
Kalervo Kujala
be2e7a7a9c Add profile handling for the unit test. 2011-12-15 00:51:10 +02:00
Kalervo Kujala
190432f252 Remove unit_test.html.
JsTestDriver has made it obsolete. Also add explicitly the used config to
the Makefile.
2011-12-12 22:31:10 +02:00
Kalervo Kujala
1c2bb4ace7 Remove unit-test from 'make test' and add Aurora to the paths on mac. 2011-12-12 22:12:33 +02:00
Kalervo Kujala
0e46928f36 Use paths to binaries for Mac in unit test makefile. 2011-12-11 14:18:40 +02:00
Kalervo Kujala
168e5db2fd Add unit test files to lint.
And fix the lint warnings from obj_spec.js.
2011-11-26 20:35:46 +02:00
Kalervo Kujala
27ba65dc6f Add unit-test to master Makefile.
And add unit-test to test-target. Also fetch the paths to browsers that are
going to be used in testing from the browser_manifest.json.
2011-11-26 20:24:39 +02:00
Kalervo Kujala
1a119bcb08 Make unit tests runnable from command line. 2011-11-24 00:03:17 +02:00
Kalervo Kujala
624a7a74ea Add jasmine files to external-directory. 2011-11-20 21:16:47 +02:00
Kalervo Kujala
c2dd452342 Create first unit test in Jasmine unit test framework.
To run the unit test open pdf.js/test/unit/unit_test.html in your browser.

This requires that https://github.com/pivotal/jasmine is cloned to the same
directory level as pdf.js.
2011-11-13 21:39:56 +02:00