summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2015-10-22Merge to XFA: Set a recursion limit on CPDF_DataAvail::CheckPageNodeOliver Chang
This limit mirrors FX_MAX_PAGE_LEVEL in fpdf_parser_document.cpp Clean merge. TBR=thestig@chromium.org BUG=544880 Review URL: https://codereview.chromium.org/1421743003 . (cherry picked from commit 3bfb1dcf56f8470b693ad1126e24e65f9d17926c) Review URL: https://codereview.chromium.org/1418173003 .
2015-10-22Merge to XFA: Make parallelized run_corpus_tests.py handle ctrl-c.Lei Zhang
Thanks Stack Overflow! TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1421623002 . (cherry picked from commit 61fe6edb3f789feefa4bd0c8475b9645fae0d09e) Review URL: https://codereview.chromium.org/1420543004 .
2015-10-19Merge to XFA: Consolidate test support code.Tom Sepez
Original Review URL: https://codereview.chromium.org/1416713002 . (cherry picked from commit 6d34d056a7188b7ae9800fe3ceb68645e0442879) Conflicts: BUILD.gn samples/BUILD.gn samples/pdfium_test.cc samples/samples.gyp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1413593003 .
2015-10-16Merge to XFA: DEPS include_rules no longer allows core/ -> fpsdfsk/ inclusion.Tom Sepez
Original Review URL: https://codereview.chromium.org/1411493002 . (cherry picked from commit 8316a8a0274558f7a0f515e04bb13a7cca5762b2) BUG=pdfium:217 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1405243004 .
2015-10-16Merge to XFA: Loosen checking on the bytes following 'stream'Jun Fang
PDF specs say that end of line markers shall follow the keyword "stream". But a white space before end of line markers follows this keyword in the test pdf files. BUG=543018 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1401923005 .
2015-10-14Merge to XFA: Add unit test for top-level bookmarks.Tom Sepez
Original Review URL: https://codereview.chromium.org/1404723002 . (cherry picked from commit 7d54a9f70f977ce9b72959ef55dc6300713ccafe) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1404193002 .
2015-10-13Merge to XFA: Allow compiling PDFium without V8.Tom Sepez
Original Review URL: https://codereview.chromium.org/1395733006 . (cherry picked from commit f1c713663192368d26031a4caed1f9705f4510af) Conflicts: BUILD.gn fpdfsdk/src/fpdfview.cpp fpdfsdk/src/javascript/JS_Runtime.cpp pdfium.gyp samples/BUILD.gn samples/samples.gyp BUG=pdfium:211 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1393833006 .
2015-10-09Merge to XFA: Parallelize run_corpus_tests.py.Lei Zhang
- Use the number of cores as the default -j value - Fall back to old code for -j 1 TBR=nparker@chromium.org Review URL: https://codereview.chromium.org/1398793003 . (cherry picked from commit fd751f28cecce61ab36038799043639d570e0b26) Review URL: https://codereview.chromium.org/1395253002 .
2015-10-07Merge to XFA: Pass v8::Isolate to PDFium at init time.Tom Sepez
New code changes in JS_Runtime.cpp. (cherry picked from commit 3dedace9623fef6161a8666e53a4ab2b9be61e4c) Original Review URL: https://codereview.chromium.org/1367033002 . Also merge to XFA: Run FXJS_V8 embedder tests against a shared isolate, since the two go together. (cherry picked from commit 4ea721cb7954898a9722c389dae86c62957352d0) Original Review URL: https://codereview.chromium.org/1377293004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1381633008 .
2015-10-02Merge to XFA: Add test case for parsing endobj keywords.Tom Sepez
(cherry picked from commit 5bd88ec07e79215400777f3095c6843e0627cade) Original Review URL: https://codereview.chromium.org/1232803005 . BUG=493126 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1237713004 .
2015-10-02Merge to XFA: Correct mistakes in test case for 507316Tom Sepez
(cherry picked from commit ccc8b21622a7d6a7723bc04e065e0ec3666dab64) Original Review URL: https://codereview.chromium.org/1377403003 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1384053002 .
2015-09-30Merge to XFA: Add signatures to FXJS_V8.Tom Sepez
(cherry picked from commit 158e335717efba9dce3aa6f6d1e31ed884e1f59e) Original Review URL: https://codereview.chromium.org/1353193004 . TBR=jochen@chromium.org, krasin@google.com Review URL: https://codereview.chromium.org/1376343002 .
2015-09-29Merge to XFA: Fix blank page issue caused by too strict correction on bpcJun Fang
For bit per component (bpc), PDF spec mentions that a RunLengthDecode or DCTDecode filter shall always deliver 8-bit samples. However, some PDF files don't follow this rule. We can find that filter is RunLengthDecode but bpc is 1 in the provided test file. In this case, pdfium will correct bpc to 8 but the actual bpc is 1. It causes a failure because the data is much more than the expected. To handle this case, pdfium doesn't correct bpc to 8 when the original bpc is 1. BUG=512557 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328213002 .
2015-09-28Merge to XFA: Introduce kPerIsolateDataIndex and tidy JS_Define.hTom Sepez
(cherry picked from commit d6d9dc6b9a45368abdf43477592ee9f6cdb6102e) (cherry picked from commit cfff2f65aaec70247d020188bc68a0dc4fb34c3e) Original Review URL: https://codereview.chromium.org/1372963003 . Original Review URL: https://codereview.chromium.org/1367813003 . TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1370133007 .
2015-09-25Merge to XFA: Add Mac-specific pixel test expectations.Lei Zhang
The font is slightly different from Linux/Windows. BUG=524043 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1366363002 . (cherry picked from commit 6c5afa68ed4e21f9d0bfd1ecc01e824d946c5485) Review URL: https://codereview.chromium.org/1361783004 .
2015-09-25Merge to XFA: Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf filesLei Zhang
Pdfium swallows 'fi' or 'ff' in some tested files because it doesn't load the embedded font file correctly. The root cause is that there is incorrect keyword like 'ngendstream' in the stream of the embedded font file. Pdfium tries to find another correct keyword but uses wrong offset rather than accumulated offset. BUG=524043 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1307353005 . (cherry picked from commit 9bd18183ba8210c91d71c3060146235750a4c71c) Review URL: https://codereview.chromium.org/1365253003 .
2015-09-17Merge to XFA: Implement FPDFAction_GetFilePath().Lei Zhang
The API is the same as the Foxit version, except the encoding is specified as UTF-8 instead of local encoding. Also remove CPDF_LWinParam since it's unused. BUG=chromium:517713 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1335373002 . (cherry picked from commit 0b3c8f742613da294f812e2f6e908f4026499f96) (cherry picked from commit a9d4bc541179ec0436adc4b2e18b7fdecc5952dc) (cherry picked from commit 4ffd89ed556e32a6527d0e88952fe20ec1e2f362) Review URL: https://codereview.chromium.org/1345953002 .
2015-09-11Merge to XFA: Fix strings, ..., void return types for Consts.h.Tom Sepez
(cherry picked from commit f9e40aec10263f9445d69598657f42550294d653) Orignal Review URL: https://codereview.chromium.org/1342433002 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1338003004 .
2015-09-10Merge to XFA: Guard against null image data in CJBig2_GRRDProc.Lei Zhang
Credit to karl at skomski.com for the initial version of the CL. BUG=527174 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1305033006 . (cherry picked from commit 89d8b4681ce98894a1ee1a6cf4bae77e00d28797) Review URL: https://codereview.chromium.org/1331303002 .
2015-09-09Merge to XFA: Remove existing generated images before running a test.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1314443007 . (cherry picked from commit 8ead9036aab18d45498e310866210dfff20da188) Review URL: https://codereview.chromium.org/1331643004 .
2015-09-09Merge to XFA:Fix heap use after free in CPDFSDK_Annot::GetPDFAnnot.Tom Sepez
(cherry picked from commit 9241e5a43990859f6f9a94aaa2c488d0451039e3) Original Review URL: https://codereview.chromium.org/1312313006 . (cherry picked from commit 343dbb841f4c12e819932e2b66dd70f817337d97) Original Review URL: https://codereview.chromium.org/1325533004 . BUG=507316 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1332653002 .
2015-09-08Merge to XFA: Beef up app_props.in and tidy app.cpp.Tom Sepez
Small manual edit in fpdfsdk/src/javascript/app.cpp (cherry picked from commit b830fbc03a6d12d8b5be50e85499c281a4c5da7f) Original Review URL: https://codereview.chromium.org/1317393003 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1302423008 .
2015-09-08Merge to XFA: Change the JS app.viewerType() return value to "pdfium"Lei Zhang
BUG=pdfium:181 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1331633002 . (cherry picked from commit 4bc64cabc561d5df211ed02dc75c85e41fa91312) Review URL: https://codereview.chromium.org/1327523007 .
2015-09-03Merge to XFA: Change fixup_pdf_template.py to open files in binary mode.Lei Zhang
Fix for the pixel test failure on Windows from commit 870b5b6793fa. Seems to work for me on Windows. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1312493006 . (cherry picked from commit 7c9e4529f63cc2ba47dd9585058c8ee8e546bc1a) Review URL: https://codereview.chromium.org/1319183004 .
2015-09-03Merge to XFA: Reapply Foxit's libopenjpeg modifications.Lei Zhang
They were lost in commit d53e6fd. BUG=pdfium:168 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1196523002 . (cherry picked from commit 870b5b6793fa261f0c6f31f026010d2d715968bf) Review URL: https://codereview.chromium.org/1301323007 .
2015-08-31Merge to XFA: Fix two issues shown by bug 489995Tom Sepez
(cherry picked from commit 6e369c2ebb4769a42736b32154c0de12b73df45d) Original Review URL: https://codereview.chromium.org/1327473002 . BUG=489995 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1325743002 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-30Merge to XFA: Add simple script to regenerate expected results.Tom Sepez
(cherry picked from commit 3fc30f0778ff0bfb1c61e7994e6472a34bdc98bd) Review URL: https://codereview.chromium.org/1264873005 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1266503004 .
2015-07-30Merge to XFA: Plumb in an externally created v8::IsolateJochen Eisinger
Origin Review URL: - https://codereview.chromium.org/1234053003 - https://codereview.chromium.org/1241863004 - https://codereview.chromium.org/1235303003 R=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/1263963002 .
2015-07-24Merge to XFA: document.delay and document.external are boolean properties.Tom Sepez
(cherry picked from commit aafeff816e22c1333c17d8a0eb4fe8927c28142d) Original Review URL: https://codereview.chromium.org/1242263010 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1244023004 .
2015-07-16Merge to XFA: Sort unexpected test results.Lei Zhang
No typos here. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1232203003 . (cherry picked from commit d3611f9db615be393016a8ab5340ccea7f13832b) Review URL: https://codereview.chromium.org/1244503003 .
2015-07-16XFA: Add a comment regarding the shut down order.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1234323003 .
2015-07-15XFA merge: Remove references to three deleted files.Bruce Dawson
The gyp-to-ninja conversion process doesn't check for missing files, so they creep in. This change deletes three files that were deleted or never added but which are referenced from .gyp files. To see warnings about deleted files (Windows only) set GYP_GENERATORS to msvs-ninja,ninja before running build\gyp_pdfium. The msvs-ninja generator warns on missing files. Ported from https://codereview.chromium.org/1201273006. TBR=tsepez@chromium.org BUG=483424 Review URL: https://codereview.chromium.org/1240823002.
2015-07-14Merge to XFA: Tighten up DEPS include rules.Tom Sepez
Original Review URL: https://codereview.chromium.org/1233583004 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1234923006 .
2015-06-19Merge to XFA: Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002. (cherry picked from commit 0ef0de55657db8a83372ad8eb22d84c5893afc4c) Review URL: https://codereview.chromium.org/1195943005.
2015-06-12Merge to XFA: Corpus tests check for unexpected successes.Tom Sepez
Original Review URL: https://codereview.chromium.org/1178393002. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1184803002.
2015-06-02Merge to XFA: Automated test case for 487928.Tom Sepez
Original Review URL: https://codereview.chromium.org/1153213004 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1158483004
2015-06-01Get test running scripts to detect and report common error, XFA.Bruce Dawson
testing/tools/run_corpus_tests.py assumes a debug build and will fail cryptically if only a release build is available. Arguably there shouldn't be a default because having one could lead to accidentally running a stale version, but that is probably too much of a change. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1150823003 Review URL: https://codereview.chromium.org/1158883005
2015-05-15Merge to XFA: Fix leaks in the embedder tests themselves.Lei Zhang
Also change EmbedderTest::TearDown() to match the destruction order in Chromium's PDF code. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1138143003 (cherry picked from commit 61ffad8df484ab9b3f7d2f5519ec470fbc023b88) Review URL: https://codereview.chromium.org/1138973004
2015-05-12Merge to XFA: Make (and verify) public/ files compile under C.Tom Sepez
The following files needed adjustment beyond a mechanical merge: fpdfsdk/src/fpdfview.cpp public/fpdf_formfill.h samples/pdfium_test.cc testing/embedder_test.cpp Original Review URL: https://codereview.chromium.org/1130843003 BUG=pdfium:158 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1137233002
2015-05-11Merge to XFA: Create top-level public/ header directory.Tom Sepez
Original Review URL: https://codereview.chromium.org/1135913002 BUG=pdfium:154 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1136703003
2015-04-27Merge to XFA: SEGV in CFX_BaseSegmentedArray::Iterate().Tom Sepez
Original Review URL: https://codereview.chromium.org/1110653002 R=thestig@chromium.org TBR=thestig@chromium.org BUG=481363 Review URL: https://codereview.chromium.org/1110763002
2015-04-23Merge to XFA: Remove unused nParamNum values from JS method tables.Tom Sepez
Original Review URL: https://codereview.chromium.org/1084183008 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1105813002
2015-04-09Merge to XFA: testing utility combo patchTom Sepez
This pulls in the following CLs from master: Review URL: https://codereview.chromium.org/1072613003 Review URL: https://codereview.chromium.org/1058463004 Review URL: https://codereview.chromium.org/1057983003 Review URL: https://codereview.chromium.org/1036073002 Review URL: https://codereview.chromium.org/1031203003 Review URL: https://codereview.chromium.org/1029193002 Review URL: https://codereview.chromium.org/1016613004 Review URL: https://codereview.chromium.org/1026903002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1062163003
2015-04-03Merge to XFA: Add embedder test comparing with the last patch.JUN FANG
When there is a wrong keyword like '??ze' in the dictionary of the trailer, PDFium can't recognize it and aborts further parsing. After this change, PDFium continues even it can't get the right size at this moment. It will rebuild the cross reference table later since the size of the table is missing. BUG=459580 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1055323003
2015-03-17Merge to XFA: Return OS status code from python test driver scripts.Tom Sepez
Original Review URL: https://codereview.chromium.org/1014083003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1011243002
2015-03-16Merge to XFA: Pull our new test case repository via deps.Tom Sepez
Original Review URL: https://codereview.chromium.org/1010833003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1010973002
2015-03-05Check whether a pdf has XFA fields before loading XFA fieldsJUN FANG
BUG=452793 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/973673002
2015-03-03Fix pdfium_embeddertests on XFA.Tom Sepez
Required to avoid a DCHECK() due to recent changes in V8 initialization. This mirrors the changes introduced at b045ed21 to pdfium_test.cpp in pdfium_embeddertest.cpp R=jam@chromium.org Review URL: https://codereview.chromium.org/969243002
2015-03-02Merge to XFA: Return error information from pdfium to JS.Tom Sepez
Cherry-pick from b720d0a14601f1496ef15297bc46d401f5a2a890 + Manually resolve merge conflicts + Fix more IWYU to fix compile. Original Review URL: https://codereview.chromium.org/963193003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/971013002