summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2016-02-18Fixup incorrect include guards.Dan Sinclair
This CL updates include guards throughout the code base to be in the chromium style. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707893004 .
2016-02-18Sort headers in non-xfa directories.Dan Sinclair
This CL runs the chromium sort-headers.py script over the non-xfa code. XFA will be done after the includes have been updated to full paths. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711793002 .
2016-02-17Expand all paths to be based off pdfium/ directoryDan Sinclair
This CL runs a script over the source and updates the include files to be a full path from the pdfium/ directory. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707923002 .
2016-02-16Refactor CPDF_SimpleParser and add unit tests.Wei Li
Remove unused member functions and simplify calls to find tag parameters. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1681403007 .
2016-02-16Simplify string function test macroWei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701123002 .
2016-02-16Fix GYP for nonxfa builds from last commit.chromium/2654chromium/2653Oliver Chang
Also disables mac build. libfuzzers are only built on Linux. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1703623002 .
2016-02-16Add initial libfuzzers for fm2js transpiling and XML parsing.Oliver Chang
GN source_sets are added so that the fuzzers can be built from //testing/libfuzzer in a Chromium checkout. GYP targets are also added to make sure these always build properly on our waterfall. These don't actually build the proper libfuzzers, but build the target fuzz function with a driver main() since the actual build process is quite complicated. R=tsepez@chromium.org, thestig@chromium.org BUG=587126 Review URL: https://codereview.chromium.org/1701103002 .
2016-02-09Add unit tests for ascii85 and hex decoders.chromium/2652chromium/2651chromium/2650chromium/2649chromium/2648chromium/2647chromium/2646Wei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1666663004 .
2016-02-04Fix tests under no_v8 build optionTom Sepez
TBR=thestig@chromium.org TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1670843002 .
2016-02-01Merge to XFA: Use JS_ExpandKeywordParams() in app.response()Tom Sepez
Original Review URL: https://codereview.chromium.org/1654523002 . (cherry picked from commit 3859258ebe9e81e1f766b57e7f78c786ae4ed495) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1658753002 .
2016-02-01Merge to XFA: Add Test for field.getArray() sort-order.Tom Sepez
Review URL: https://codereview.chromium.org/1650623004 . (cherry picked from commit 56d618ac9b4c82a9a350f21bbc6ec2ec6a95c8b0) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1657533004 .
2016-01-29Merge to XFA: Fix botched "CC:" parameter passing in JS_DocmailForm().Tom Sepez
Original Review URL: https://codereview.chromium.org/1645413002 . (cherry picked from commit 6902db5cbaf0afb8f2cb4df325e1a4e7d6acd53f) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1648793006 .
2016-01-29Merge to XFA: Add tests for CBA_AnnotIterator.Tom Sepez
Original Review URL: https://codereview.chromium.org/1652533002 . (cherry picked from commit 1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1652543003 .
2016-01-29Merge to XFA: Fix behaviour of app.alert() with a single object argument.Tom Sepez
Original Review URL: https://codereview.chromium.org/1641693003 . (cherry picked from commit 66519af52b61ca158044651d0507d47efb364f87) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1639253008 .
2016-01-20Merge to XFA: Bugs in CJS_PublicMethods::ParseNumber().Tom Sepez
Original Review URL: https://codereview.chromium.org/1586203006 . (cherry picked from commit f13d510cf267c27f4c123494de67670ec201cedc) BUG=pdfium:361 R=ochang@chromium.org TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1603173004 .
2016-01-19Merge to XFA: Hook up show-config to testing scripts.Tom Sepez
Review URL: https://codereview.chromium.org/1607923004 . (cherry picked from commit d40e189ba1ab515ef9b3df7928e215be150df336) TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1607113002 .
2016-01-19Merge to XFA: Fix infinite loops caused by calling circular indirect objectsWei Li
There are multiple functions in CPDF_Object class which can cause infinite loop due to recursively calling circular indirect objects. Fix them by deference indirect object first. BUG=pdfium:355 TBR=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1585533002 . (cherry picked from commit 90853cb1dfd1bf3803ec21cfae3e93948137be61) Review URL: https://codereview.chromium.org/1602103004 .
2016-01-19Merge to XFA: Unify suppressions files and add matcher syntax.Tom Sepez
Review URL: https://codereview.chromium.org/1586043006 . (cherry picked from commit 2cb9ae0309417222aa3555dabe4749119dc36d84) R=ochang@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1582613012 .
2016-01-15Merge to XFA: Make the bug 361 test case work in Acrobat.Lei Zhang
BUG=pdfium:361 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1586983005 . (cherry picked from commit a943a2516e5483012e0fbef7e8fafbed1b22ed95) Review URL: https://codereview.chromium.org/1582413007 .
2016-01-14Merge to XFA: Loose checking for trailer's size fieldWei Li
Although trailer's size value is required by spec, other readers such as Acrobat or libpoppler can handle without it. Loose up the check to be more tolerant. BUG=pdfium:213 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1582193002 . (cherry picked from commit 34291b900ad0472eef582215cfce0d942a40fd16) Review URL: https://codereview.chromium.org/1589783004 .
2016-01-14Merge to XFA: Correct the way to count pages and to avoid infinite loopWei Li
BUG=pdfium:360 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1585823003 . (cherry picked from commit 5d5d9fe7bd1c9566b9d6570015b7c60894d9fc0c) Review URL: https://codereview.chromium.org/1583073004 .
2016-01-14Merge to XFA: Additional test cases for bug_361Tom Sepez
Original Review URL: https://codereview.chromium.org/1582383002 . (cherry picked from commit 1a82d5c28be2ebdb7524a7249e43026546d0ebf0) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1590053002 .
2016-01-13Merge to XFA: test cast for bug_361Tom Sepez
Original Review URL: https://codereview.chromium.org/1588733003 . (cherry picked from commit 15367cbbb7b8bea2549212b3c9c1f01727c6ccb5) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1584563005 .
2016-01-11Merge to XFA: Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject()Wei Li
CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1575833004 . (cherry picked from commit d3ab0f383f6736657480a8bb418c5e715a1aed3b) Review URL: https://codereview.chromium.org/1571333004 .
2016-01-08Merge to XFA: Fix infinite loop caused by parsing same indirect objectsWei Li
BUG=pdfium:343 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 . (cherry picked from commit 149f1db8bba85bdf2b40d330c38f2478695ca0d5) Review URL: https://codereview.chromium.org/1575663002 .
2016-01-07Merge to XFA: Disentangle fpdfsave_embeddertest's FPDF_FILEWRITE.Tom Sepez
Original Review URL: https://codereview.chromium.org/1561303002 . (cherry picked from commit 5dc13d7858f9caf58b0e12f38823300a739302e2) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1569973002 .
2016-01-07Merge to XFA: Fix a GetFileContents() call that should have been in commit ↵Lei Zhang
aa326bd6. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1568763003 . (cherry picked from commit 0213958bf66e839f132d9dea531d2627091c3cbe) Review URL: https://codereview.chromium.org/1565783004 .
2016-01-06Invalidate IPWL_FocusHandler and IPWL_Provider on destruction.Lei Zhang
BUG=572871 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1564773003 . (cherry picked from commit dcac57bc8b64fdc870d79d11a498ae7021cf8ae7) Review URL: https://codereview.chromium.org/1569663002 .
2016-01-06Merge to XFA: Return unique_ptrs from test_support functionsTom Sepez
Orignal Review URL: https://codereview.chromium.org/1563513002 . (cherry picked from commit aa326bd6b169dc1b5b9b83048c71799799ab34c6) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1564583004 .
2016-01-06Merge to XFA: Add fpdf_edit basic creation embedder test.Tom Sepez
Original Review URL: https://codereview.chromium.org/1554133003 . (cherry picked from commit d368261cc8d604286e29ca6358700e6bb051dcaa) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1567643002 .
2016-01-05Merge to XFA: Fix an infinite loop in CPDF_Parser::RebuildCrossRef().Lei Zhang
BUG=pdfium:325 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1543043003 . (cherry picked from commit 2d88e91ca5538470c9f4bc098e7f1f1ea9013c37) Review URL: https://codereview.chromium.org/1560903002 .
2016-01-05Merge to XFA: Exit infinite loops for cross reference loadingWei Li
When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 . (cherry picked from commit aab8f462ea3368ed4825172231131e1a10db978d) Review URL: https://codereview.chromium.org/1556423002 .
2016-01-05Merge to XFA: Make FPDF_WIDESTRING work regardless of endianness.Tom Sepez
Original Review URL: https://codereview.chromium.org/1554363002 . (cherry picked from commit ed34cdf99d5a4b33e57f81f9244a311f6fb86db3) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1559373002 .
2016-01-04Merge to XFA: Add FPDFDoc_GetPageMode() embeddertestTom Sepez
Original Review URL: https://codereview.chromium.org/1557173002 . (cherry picked from commit 14fdb1d40741912e430db4318a9033764429659f) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1556983003 .
2015-12-31Merge to XFA: Reapply "Fix a partial rendering problem"Lei Zhang
This reverts commit 054fc955c153eb5c581fd14946848b8b2a77136a. Additionally, this rolls DEPS for the testing corpus to update test expectations. BUG=pdfium:336 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1555833002 . (cherry picked from commit 5594538fcc96c38db34f336223140cf703e3cca0) Review URL: https://codereview.chromium.org/1553013002 .
2015-12-24Merge to XFA: Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 . (cherry picked from commit d20dfba2ae10e8aeb328328f09da79ff904110a8) Review URL: https://codereview.chromium.org/1545183002 .
2015-12-21Merge to XFA: Fix JS seconds since epoch to date conversions.Lei Zhang
BUG=515137,564736 TBR=ochang@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1533233002 . Review URL: https://codereview.chromium.org/1544493003 . (cherry picked from commit b426e3edde040089b70d1a223c83b90957aa571d) (cherry picked from commit bd35d484a4027775f19ff93e9143e0b270133d42) Review URL: https://codereview.chromium.org/1546443002 .
2015-12-11XFA: Missing license in make_expected.shTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1513393004 .
2015-12-10Merge to XFA: Fix integer and bounds issues in sycc4{22,44}_to_rgb.Oliver Chang
Also clean up while we're here. BUG=557223 TBR=tsepez@chromium.org Original Review URL: https://codereview.chromium.org/1512833008 . (cherry picked from commit 08750d0400f1635ac33c3234cb11b192f31a1eeb) Review URL: https://codereview.chromium.org/1521473003 .
2015-12-09Merge to XFA: Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().Lei Zhang
BUG=pdfium:298 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 . (cherry picked from commit 93181f9a20db7ac706bb9405750303db93762a5b) Review URL: https://codereview.chromium.org/1514783002 .
2015-12-06Merge to XFA: fix for stream object readingWei Li
Loosen a check for earlier version of PDF files. When the bytes with specified length are followed by 'endstream' keyword, even if there is no EOL marker before the keyword, it signals the end of stream. BUG=551258 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1499433002 . (cherry picked from commit 0ff66089c87ab6e3adaaff0ec69728ce7a8d8299) Review URL: https://codereview.chromium.org/1504723002 .
2015-12-01Merge to XFA: Add basic checking for RebuildCrossRefWei Li
RebuildCrossRef function returns false when we can not find file trailer or any indirect object. This serves as a basic file format checking. BUG=pdfium:215 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1476163002 . (cherry picked from commit f14da1d58e8e12633c7a47e6efd5ffe43bb37b4b) Review URL: https://codereview.chromium.org/1486383002 .
2015-11-30Allow building non-XFA (master) on the XFA branch.Tom Sepez
This first pass is GYP-only, will do GN in the next CL. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1480403002 .
2015-11-23Merge to XFA: Enable Dr. Memory to run javascript, pixel, and corpus testsQin Zhao
- add DrMemoryWrapper in common.py to adjust Dr. Memory wrapper - add --wrapper option to run_*_tests.py for Dr. Mempry wrapper - update run_*_tests.py to handle Dr. Memory wrapper - add TestPDFiumTest in pdfium_tests.py to support run_*_tests.py - remove ValgrindTool in valgrind_tests.py R=thestig@chromium.org BUG=pdfium:238 Review URL: https://codereview.chromium.org/1464453003 . (cherry picked from commit 36476923ae5eb8e9283e605f3c85ee8811c86014) Review URL: https://codereview.chromium.org/1465333002 .
2015-11-20Merge to XFA: Initialize V8 before starting embedder testsTom Sepez
Pull Jochen's fix before it is forgotten. Original Review URL: https://codereview.chromium.org/1462313002 . (cherry picked from commit 3ccd36892fe826e8f2ed8dde0819756ae3546733) TBR=jochen@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1470443002 .
2015-11-20Merge to XFA: Change |CCodec_ScanlineDecoder::m_Pitch| to FX_DWORDOliver Chang
This matches the type of the corresponding |CFX_DIBSource::m_Pitch|, where integer overflow is checked for FX_DWORD. This change is propagated to many other places. Also, check for integer overflow in |CCodec_RLScanlineDecoder::Create| during the calculation of |m_Pitch| since it aligns to 4 bytes while overflow was was previously checked without this alignment. TBR=tsepez@chromium.org BUG=555784 Review URL: https://codereview.chromium.org/1460033002 . (cherry picked from commit e7950df70a2fd658f466751b29483436cb31e829) Review URL: https://codereview.chromium.org/1461363002 .
2015-11-12Merge to XFA: Clear decoders after the image decoder in the /Filter array.Oliver Chang
During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . (cherry picked from commit 182d129bcee8f7731b9bbfde0064295ad3b37271) Review URL: https://codereview.chromium.org/1436153003 .
2015-11-11Merge to XFA: Fix extraction of colour components in ↵Oliver Chang
CPDF_DIBSource::DownSampleScanline32Bit Previously, if |m_bpc| was < 8 (e.g. 4), this function may still try to access the source components as if |m_bpc| == 8. Even when it fell into the codepath that tried to do the right thing in this case, it was wrong. BUG=554151 TBR=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9b99615806e358fdb396d1cb162ee2e69c2a20ec Review URL: https://codereview.chromium.org/1433423002 . (cherry picked from commit e21fe98d5b5da7da01503b985b07b90c8e811689) Review URL: https://codereview.chromium.org/1441563002 .
2015-11-10Merge to XFA: Support linearized loadingJun Fang
BUG=446715 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1353093003 . Conflicts: core/include/fpdfapi/fpdf_parser.h core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp samples/pdfium_test.cc testing/embedder_test.cpp testing/embedder_test.h Review URL: https://codereview.chromium.org/1412083010 .
2015-11-09Merge to XFA: Fix all relative includes to core.Lei Zhang
Do some IWYU to fix build errors due to files that have no #includes but just happened to work previously because the #includes were in the right order. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1407423004 . (cherry picked from commit 9e7cd8ffb81c564e1102f6c6459ec0942a0b11ea) Review URL: https://codereview.chromium.org/1425163004 .