Age | Commit message (Collapse) | Author |
|
This CL adds the ability to run a given test from the corpus, javascript and
pixel test runners. The filename to provide is relative to the testing
directory in question.
Because the directories for javascript and pixel are flat you just provide the filename (it will rewrite the .pdf to .in if .pdf is provided). For corpus tests you have to provide the path from the corpus directory.
Development/pdfium/pdfium % ./testing/tools/run_javascript_tests.py apply.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/javascript/apply.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Development/pdfium/pdfium % ./testing/tools/run_pixel_tests.py bug_524043_1.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.
Linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.0.png
diff: 0.00% passed
Development/pdfium/pdfium % ./testing/tools/run_corpus_tests.py third_party/tcpdf/example_065.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png
diff: 0.14% failed
FAILURE: example_065.pdf; Command '['/Development/pdfium/pdfium/out/Debug/pdfium_diff', '/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065_expected.pdf.0.png', '/Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png']' returned non-zero exit status 1
Summary of Failures:
/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065.pdf
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1407913005 .
|
|
When we call OpenDocument we fail to check if the document was actually opened.
Currently we return true in all cases (assuming we read the file). This CL
updates the code to check if the document was opened and return false if not.
I've updated several tests to check for FALSE instead of TRUE. I verified the
documents in fact don't open with my local (non-PDFium) PDF reader.
BUG=pdfium:223
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1417893007 .
|
|
The m_pShadingObj can be a stream or a dictionary depending on how it's used.
This CL adds some simple type checking to make sure that the type of the
object matches what we expect.
BUG=chromium:547706
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1421973004 .
|
|
There appear to be a bunch of corpus tests which fail with this change such
as FAILURE: shading1.pdf
This reverts commit 85361b227ad6786d2aeef8409b79a8d077a26ee9.
Make m_pShadingObj a CPDF_Stream instead of CPDF_Object.
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1414283003 .
|
|
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1426713002 .
|
|
This limit mirrors FX_MAX_PAGE_LEVEL in fpdf_parser_document.cpp
R=thestig@chromium.org, tsepez@chromium.org
BUG=544880
Review URL: https://codereview.chromium.org/1421743003 .
|
|
Thanks Stack Overflow!
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1421623002 .
|
|
Removes duplication between pdfium_test and pdfium_embeddertest
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1416713002 .
|
|
Adds the following new violations:
ERROR in core/include/fpdfapi/fpdf_parser.h
Illegal include: "public/fpdfview.h"
ERROR in core/include/fpdfapi/fpdf_render.h
Illegal include: "public/fpdf_progressive.h"
ERROR in core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
Illegal include: "public/fpdfview.h"
BUG=pdfium:217
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1411493002 .
|
|
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 .
|
|
Null FPDF_BOOKMARK represents the "root" bookmark, and must
not segv when asking about titles or children.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1404723002 .
|
|
- Use the number of cores as the default -j value
- Fall back to old code for -j 1
R=nparker@chromium.org
Review URL: https://codereview.chromium.org/1398793003 .
|
|
Original patch from issue 1391843004 at patchset 1
(http://crrev.com/1391843004#ps1)
Introduce a pdf_enable_v8 GYP variable, which controls a
corresponding PDF_ENABLE_V8 #define, and bring in the real
JS library when set. Otherwise, link against a stub JS
runtime.
BUG=pdfium:211
R=dml@google.com, jochen@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1395733006 .
|
|
Start to back-fill some tests for the recent isolate work.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1377293004 .
|
|
Original patch by chamalsl.
Trailer size in bug_507316 was wrong.
embedder_test.cpp's GetPageTrampoline passed null parameter.
It will affect future test cases even if it does not affect
this.
BUG=507316
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1377403003 .
|
|
BUG=chromium:529012
R=jochen@chromium.org, krasin@google.com
Review URL: https://codereview.chromium.org/1353193004 .
|
|
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 .
|
|
Also changes DEPS to specify a specific v8 version, this will
require us to manually update this version from time to time,
but also solves a longstanding problem where going back to an
older version (say for bisecting) wouldn't always work.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1372963003 .
|
|
The font is slightly different from Linux/Windows.
BUG=524043
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1366363002 .
|
|
files""
This reverts commit fa9756f77ad6145940d3dc697814b84f5755ae17.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1307353005/
|
|
This reverts commit 9bd18183ba8210c91d71c3060146235750a4c71c.
|
|
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
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1307353005 .
|
|
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=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1335373002 .
|
|
Replace multiple #defines of the same strings with externs.
Fix strings mangled by interaction of # and clang-format.
Remove macros as possible.
Make more JS_ functions void and simplify.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1342433002 .
|
|
Credit to karl at skomski.com for the initial version of the CL.
BUG=527174
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1305033006 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1314443007 .
|
|
Use two seperate loops to kill current focus annot and to release annots
in current page. Loop to kill current focus annot is run first, so it
will not access deleted annots.
BUG=507316
R=tsepez@chromium.org
TEST=Reproduction steps mentioned in issue 507316 should not crash
chrome.
Unit test added to pdfium.
Run pdfium_embeddertests.exe.
Review URL: https://codereview.chromium.org/1312313006 .
|
|
Upload pdf test files for codereview 1312313006.
BUG=507316
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1325533004 .
|
|
Some of the values returned are dubious; capture the
current state of affairs.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1317393003 .
|
|
BUG=pdfium:181
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1331633002 .
|
|
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 .
|
|
They were lost in commit d53e6fd.
BUG=pdfium:168
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1196523002 .
|
|
- Handle NULL in buffer operator<< under JS mailForm() calls.
- Ensure correct type in JS addIcon() calls.
BUG=489995
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1327473002 .
|
|
This reverts commit d8b5e73d8609b74e6a995ee1768d20d47bd4b089.
Broke corpus tests
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1292153002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1268323004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1259963005 .
|
|
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
|
|
(I've been doing this by hand for far too long).
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1264873005 .
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258203005 .
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255933006 .
|
|
This is the javascript test failure at 320b2313d198.
The spec says they are booleans, not ints, so correct the behaviour now.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1242263010 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1242493003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1232203003 .
|
|
This matches the Chromium PDF plugin changes in
https://codereview.chromium.org/1230313006/
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1237233006 .
|
|
This reverts commit 5bd88ec07e79215400777f3095c6843e0627cade.
|
|
There is no assurance that the expected result files are consistent
with other readers. Jun will have to verify that after making his
parser changes for bug 493126.
BUG=493126
R=thestig@chromium.org, jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1232803005 .
|
|
This reverts commit 304578020122cc4d2a4a8c1598694ef2b9be92b5.
Turns out that in both cases v8 is already destructed at those points,
and we can't pump the message loops.
TBR=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1236603003 .
|
|
In Chrome, all Isolates must be created by gin
R=tsepez@chromium.org, ulan@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1234053003 .
|
|
R=tsepez@chromium.org, ulan@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/1230393006 .
|
|
Allows the following command to return only legitimate
warnings:
buildtools/checkdeps/checkdeps.py --resolve-dotdot
The remaining warnings consist of:
- fx_parser_filters.cpp, due to inclusion of
third_party/zlib_v128/zlib.h, showing the lack
of a header and some prototypes in that .cpp file.
- third_party/*, due to inclusion of fx_system.h and
the like, indicating adulterated libraries that should
be restored to their pristine state.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1233583004 .
|