Age | Commit message (Collapse) | Author |
|
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
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1058463004
|
|
Now that there's a win bot, this needs to be more careful.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1036073002
|
|
There's investigation required to see why there are such
platform differences, but for now, a perpetually red bot
isn't useful.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1002283003
|
|
This involves bringing some of the suppressions file
mechanism into run_pixel_tests.py (making a common
module would be a nice follow-up)
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1032923002
|
|
This is required now that we have win/mac bots, which may produce
different outputs.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1031203003
|
|
No-op CL intended to trigger a rebuild.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1036583002
|
|
The comment character is #.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1029193002
|
|
This is needed to green the tree without continually reverting the
pdfium_tests (corpus) repository.
We will need to make this more sophisticated at some point, but for
now, let's try to green the buildbot.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1016613004
|
|
This should make the test logs more readable.
Also give failure summary at end of tests, since searching
through the log is tedious.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1026903002
|
|
This reverts commit de00893874a9d5ecae497e00511e2395fc2f02e8.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1017793003
|
|
This will be immediately reverted, but I need to be sure that the
previous change actually detects failures.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1008873005
|
|
Consequently, some of the tests may diff but the waterfall remains green.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1014083003
|
|
Add a run_corpus_tests.py script to run pdfium_test against
the corpus tree.
Note that this differs from the run_pixel_tests.py script,
since pre-processing is not required. I'll work on unifying
these in a subsequent CL.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1010833003
|
|
This implements the previously unimplemented JS_Error() function.
Along the way:
- fix some IWYU when the include order in global.cpp was perturbed.
- remove some uses of JS_ErrorString, to increase transparency.
- use vp.IsSetting() in place of !vp.IsGetting() for clarity.
- specify an error string on several error return paths.
- add an error string for writing readonly properties.
- rename an error string constant to reflect the actual message.
- replace calls to variadic Format() with a function doing string appends.
- remove unused JS_GetClassName()
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/963193003
|
|
For chromium checkouts, the top-level gmock is used instead.
Verify build with a simple test that ensures neither mock
method is fired.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/955513009
|
|
This is the first step in allowing an embedder test to
someday gMock its callbacks, so that it can check that they
fired as expected. gMock wants a class, not a C-style
function-based API, and EmbedderTest is made to bridge
between the two.
The EmbedderTest class itself is modified to inherit from
the C JS API classes themselves, to make finding the
delegate easier.
For example, a future embedder test might send a keystroke
to a page, which would then trigger JS, which would then
trigger an Alert(). Mocking the Alert() callback would
allow the test to check that the alert happened as
expected.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/960663002
|
|
Required to save space vs. raw bitmap. Land prior to adding
substantial number of tests.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/953723004
|
|
Exercises a separate code path that stores some JS objects
outside of JS. Needed before re-writing some other portions
of the JS_Defines.h code.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/943783002
|
|
On origin/master, we only have .ppm format support, so the
expected output files would take up a lot of space. Hence,
this may not get going until XFA hits with its .png
support.
Nor is there a good way to diff these; XFA provides this
for .png as well.
But this will provide at least one automated test to ensure
that we've got non-blank output, at least for one trivially
simple case.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/926173002
|
|
The top-level directory name isn't part of the repository, and we
can't count on it always being "pdfium" (though many people will
choose to do it this way).
R=jam@chromium.org
Review URL: https://codereview.chromium.org/921043005
|
|
Along the way, I rename some functions in pdfium_test.cc to
match the style guide's FunctionName() syntax, adding
"Example" to make them obviously different from the PDF
internal code with similar name fragments.
The purpose is to at least have some coverage for the
setter/getter macros from JS_Define.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/928573002
|
|
Top level script driver for testing/resources/javascript.
Converts each input template file in that directory to a
.pdf file in the working directory (typically
out/Debug/gen/pdfium/testing/resources/javascript), invokes
pdfium_test on it to generate , and crudely diffs the
expected output.
We can now remove generated .pdfs from source control,
keeping only the hand-editable .in templates.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/912803004
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/908023003
|
|
This is a plan for testing JS inside of pdf files under pdfium:
Communication of results will be done via app.alert(), rather than
console.println(), since the latter is not hooked up to any API
callbacks.
pdfium_test.cc is modified to be more careful about use of stdout/stderr,
so that only the app.alert() and the unsupported feature callback use
stdout. Diffing stdout against ..._expected.txt files gives the result.
I added a /javascript directory to separate these from the embeddertest
resources.
The alert callback is backported from XFA. This was an omission.
BUG=https://code.google.com/p/pdfium/issues/detail?id=62
R=jam@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/872103003
|
|
Handles the case of this malformed PDF without crashing. Note that to
get a reproducible test case, a small fix is applied to our .py script
which results in some whitespace/numbering difs across the resources
(down the road, we ought to generate them on the fly in an intermediate
directory).
BUG=454695
R=jun_fang@foxitsoftware.com, thestig@chromium.org
Review URL: https://codereview.chromium.org/895933003
|
|
BUG=https://code.google.com/p/pdfium/issues/detail?id=113
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/880043004
|
|
BUG=452455
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/887063003
|
|
This removes some duplicated code from each individual test.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/885403002
|
|
These reproduce under pdfium_test with a scale factor < 1.0. Add
them to the repository now for the sake of posterity, even if we
are not automatically testing them.
BUG=451265
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/869923003
|
|
Original Review URL: https://codereview.chromium.org/878333003
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/884873002
|
|
This was fixed by https://codereview.chromium.org/743263002, but the
bug remained open due to confusion.
BUG=https://code.google.com/p/pdfium/issues/detail?id=57
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/878523003
|
|
A suitably corrupted file can cause the parser(s) to repeatedly re-read
sections of the file at increasing parser recursion depth until the
stack is exhausted. There is supposed to be a check for this based upon
the parser "level", but not all call paths pass or update the level as
required.
Much as I hate per-class statics, this introduces one to track the depth
so that the check is enforced no matter how screwy the call path might be
that leads the parser to re-enter itself. This is more palatable than trying
to find all these paths and fix them. We know this is OK since there is
only one thread in here modifying the static.
BUG=451830
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/875263002
|
|
We are making checks in the incorrect order. Also adds two test
cases, one for the this crash, and another for the original issue
that motivated the patch.
Original Patch by Bo at https://codereview.chromium.org/866003003/
BUG=450871
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/872563002
|
|
Currently, this is a difference between the standalone pdfium environment
vs. pdfium as part of a chromium checkout.
Locating the external data files is a nusiance when you don't have the
binary's argv[0] line, so we create a new main that preserves this for
us.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/851283006
|
|
This also adds a fpdfdoc_embeddertest.cpp to keep the test
file name matching with the API call under test.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/812933004
|
|
Follow-on work from patch at https://codereview.chromium.org/845643008. This
incorporates that patch, plus adds tests for it and similar conditions. A few
changes are introduced to correct expected behaviour.
This also incoprorates Deepak's fix in https://codereview.chromium.org/845643008/
This incorporates a formerly unlanded tool to generate small valid PDF
files from template input, which is needed to cover all the error cases
here. See https://codereview.chromium.org/791993006/
BUG=450133
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/837723009
|
|
This was somehow lost along the way to creating embedder tests. Presumably
this silently leaks in origin/master, but triggers an assert under XFA. Fixing
this on master is a pre-requisite for merging all the embedder test code onto
XFA.
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/856773003
|
|
This includes:
- Fix TestLoader lifetime.
- Rename test file to match the equivalent .cpp under test
- Re-organize a few tests to avoid duplicate loading
- add tests for a few additional functions.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/857483005
|
|
BUG=https://code.google.com/p/pdfium/issues/detail?id=62
R=jam@chromium.org
Review URL: https://codereview.chromium.org/827733006
|
|
This allows integration with the gtest EXPECT_* macros.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/837843002
|
|
In order for the standalone pdfium build to succeed,
DEPS is updated to pull in gtest, and a stub gtest.gyp
file is provided (which is unused under a chromium
checkout).
R=brucedawson@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/835233002
|