summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-26Use correctly-typed error codes for fx_codec_jpx_unittestTom Sepez
Needed to fix the failed pdfium_unittests on windows. Ironically, I created these constants so I wouldn't mix up size_t's and off_t's in these tests, but I didn't apply them consistently. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1036743005
2015-03-25Suppress many failing mac tests.Tom Sepez
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
2015-03-25Suppress our "pixel" test on mac since it diffs.Tom Sepez
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
2015-03-25Create per-platform pdfium test suppression files.Tom Sepez
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
2015-03-25Add testing/corpus to .gitignoreTom Sepez
TBR=halyavin@chromium.org Review URL: https://codereview.chromium.org/1032853004
2015-03-24Add comments to suppressions fileTom Sepez
No-op CL intended to trigger a rebuild. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1036583002
2015-03-23Support comments and blank lines in SUPPRESSIONS fileTom Sepez
The comment character is #. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1029193002
2015-03-23Create simple suppressions file in PDFium repository.Tom Sepez
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
2015-03-23Flush stdout before launching sub-processes.Tom Sepez
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
2015-03-23Try to make a NOTREACHED definition suitable for win8.chromium/2351chromium/2350chromium/2349chromium/2348chromium/2347chromium/2346chromium/2345chromium/2344chromium/2343Tom Sepez
See http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_gn_rel/builds/5674 Testing this is a two-step process: land CL to pdfium, then try DEPS roll in chromium against this version on the win8 trybots. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1004733006
2015-03-20Roll DEPS to pull in full, regenerated corpus of testsTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1023383003
2015-03-20Turn down warning level for GN build of image_diff utilityTom Sepez
Next attempt to get GN build to work. Once this lands, doing a DEPS roll against the win8_chromium_gn_dbg trybot seems to catch the issue. Restore image_diff_png.cc to its previous state. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1024243003
2015-03-20Fix missing include for std::minTom Sepez
Build broken on trybot at http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/66012/steps/compile%20%28with%20patch%29/logs/stdio R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1026843002
2015-03-19Revert corpus to last known working version.Tom Sepez
Failures from last roll need diagnosis. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1023913002
2015-03-19Fix corpus roll broken in the previous commit.Tom Sepez
R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1020093002
2015-03-19Bring in entire corpus for testing.Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1021003002
2015-03-19Pull in specific revision of PDF corpus via DEPS.Tom Sepez
There are two reasons for doing this. The first is that adding files to this repository doesn't trigger a rebuild on the bot, so the next unrelated pdfium change will be the one to hit any issues with the unversioned corpus. The second is that we may need a specific version of the expected output files (.pngs) to go with a specific pdfium build. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1019783003
2015-03-19Fix subtle issues in opj_skip_from_memory and add unit tests.Tom Sepez
Follow on to https://codereview.chromium.org/990683002/. This more closely mimics what fseek() actually does, so as to avoid subtle bugs down the road. Move the DecodeData struct into a header so the test can use it, and provide a constructor for it. Along the way, I added include guards, removed the p_ prefix from some non-pointer vars, fixed some IWYU, and resolved some signed/unsigned comparison warnings with careful casting. BUG=452671 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1016203002
2015-03-17Revert "TEST that the tree goes RED when pixel/javascript tests fail."Tom Sepez
This reverts commit de00893874a9d5ecae497e00511e2395fc2f02e8. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1017793003
2015-03-17TEST that the tree goes RED when pixel/javascript tests fail.Tom Sepez
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
2015-03-17Return OS status code from python test driver scripts.Tom Sepez
Consequently, some of the tests may diff but the waterfall remains green. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1014083003
2015-03-17Revert "Fix a problem that JP2 image is not displayed because index color ↵Tom Sepez
space is used" This reverts commit 5a0e504d53195892458d819e52c62bea0c710bd5. Original review URL https://codereview.chromium.org/1009513003 Reason for revert: New "corpus" tests show that this is no longer rendering some images. See, e.g. http://chromegw/i/client.pdfium/builders/linux/builds/144/steps/corpus%20tests/logs/stdio for those that diff'd. TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1016823003
2015-03-16Pull our new test case repository via deps.Tom Sepez
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
2015-03-16Speculative fix for breakage in pdfum DEPS rollTom Sepez
Speculative because we still don't have pdfium buildbots for mac/win on the pdfium waterfall. Nonetheless, the two build errors reported in https://codereview.chromium.org/989213003/ seem to be a default statement in a switch fully covering all of an enum constant, and the use of <cstdint> instead of <stdint.h> on mac. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1011803003
2015-03-16Fix a problem that JP2 image is not displayed because index color space is usedJUN FANG
There are two issues in this bug. One is that JP2 image is not displayed because it aborts loading Jpx bitmap when the number of components in color space is different with that one in JPX images. I found that the number of components in color space isn't updated after it's initialized. For index color space, the component shall inherit from its base color space. The second issue is that displayed color is not correct after I fixed the first issue. The root cause is that sRGB is used in JPX image, it doesn't need to map from index to RGB again. BUG=464215 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1009513003
2015-03-16Fix a bug that JPX images can't be shownJUN FANG
In the process of opj_end_decompress, it will return fail when the end of coding stream is reached. However it returns true in the same scenario implemented in openJPEG. So the final solution is from openJPEG. Return true when the end of coding stream is reached. BUG=452671 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/990683002
2015-03-16Fix potential integer overflow in fpdf_render_image.cppJUN FANG
BUG=382661 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1007643002
2015-03-12Revert "Kill CFX_GrowOnlyPool."Tom Sepez
This reverts commit 090d683489bfa3f36f1e2624c310ff9ca5836038. Symbol appears in files that are not compiled anywhere, it would seem. Reverting to remove these first. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1001023003
2015-03-12Kill CFX_GrowOnlyPool.Tom Sepez
It's unused, and when the time comes, we'll want to put pdfium onto a hardened allocator like partitionAlloc anyways. Along the way, merge adjacent #ifdef __cplusplus blocks, remove a pointless check for __cplusplus inside a .cpp file, and remove a redundant cast. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1008483002
2015-03-10Kill remaining sprintfsTom Sepez
I thought I had done this already, apart from the third-party libraries, but there were a couple remaining (the third-party libraries will still call this, they should be tweaked upstream as needed). R=thestig@chromium.org Review URL: https://codereview.chromium.org/999543002
2015-03-06Fix multiply defined macro in zlib.h on linux_chromium_clobber_rel_ng builder.Tom Sepez
Speculative fix since the issue doesn't reproduce locally. TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/988883002
2015-03-06Make conversions for CPDF_Link explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_LINK is a CPDF_Dictionary, and a CPDF_Link is a structure holding a FPDF_LINK. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed. R=thestig@chromium.org Review URL: https://codereview.chromium.org/985503005
2015-03-06Fix the pdfium component build.Brett Wilson
It has a component with no object files in it. When compiled as a shared library, this fails. This changes the target to a source set which can handle empty sources. It also changes the other static libraries in pdfium to source_sets (it should be very rare to need real static libraries). Runs "gn format" over the BUILD files. Renames the arg bundle_freetype to pdfium_bundle_freetype which makes more sense in the context of a larger build like Chrome. R=jam@chromium.org Review URL: https://codereview.chromium.org/985543002
2015-03-06Make conversion between CPDF_Dest and its object explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_Dest is a CPDF_Array, and a CPDF_Dest is a structure holding a FPDF_Dest. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed, etc. R=thestig@chromium.org Review URL: https://codereview.chromium.org/984703004
2015-03-06Add gmock to .gitignoreTom Sepez
This is an attempt to fix git rebase-update, which complains about uncommitted changes. TBR=halyavin@chromium.org Review URL: https://codereview.chromium.org/985833002
2015-03-05Make conversion between CPDF_Action and its dictionary explicit.Tom Sepez
Precursor to taking a second shot at cleaning up the FPDF_* APIs. A FPDF_Action is a CPDF_Dictionary, and a CPDF_Action is a structure holding a FPDF_Action. This goes against the convention that FPDF_ types get cast to CPDF_* types, so we want to make it clear where objects are getting constructed, etc. Also tidy fpdf_actionhandler.cpp because it bugs me. R=thestig@chromium.org Review URL: https://codereview.chromium.org/984773002
2015-03-04Merge to Master: Fix a compiling error in fxjs_v8.hTom Sepez
Original Review URL: https://codereview.chromium.org/965423004 TBR=thestig@chromium.org TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/976033005
2015-03-02Kill off JS_ErrorString type.Tom Sepez
This provides no benefit, and reduces transparency. Along the way: Kill off some unused/commented-out code. Return void where a bool return doesn't make sense. Remove a pointless template type. Remove now unused constants and types. R=thestig@chromium.org Review URL: https://codereview.chromium.org/971033002
2015-03-02Return error information from pdfium to JS.Tom Sepez
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
2015-02-27Do hit tests against Annots in reverse order.Lei Zhang
BUG=chromium:445408 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/952423002
2015-02-27Remove unused IDS_ constants from pdfium.Tom Sepez
Along the way, I noticed that one of these is used in a header file that isn't included anywhere and describes no actual code (JS_Console.h). Also add missing header guards, and IWYU to resources.h Also move a static function from a header to the new resources.cpp file. Also fix the grammar on some of the error messages. Most of these appear to be JS error messages destined for a JS error handler or (someday) a console (which can remain in english), and oddly, some appear to be about failed form validation, which smells user-facing. Also check that the message makes sense for the point the C++ code wants to use it, and reword accordingly. As it turns out, these currently don't make it back to JS due to the unimplemented JS_Error() function; this is an enabling step towards implementing it. R=thestig@chromium.org Review URL: https://codereview.chromium.org/955273003
2015-02-27Pull in gmock for standalone pdfium builds.Tom Sepez
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
2015-02-27Upgrade openjpeg to revision 2997.JUN FANG
BUG=457493 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/960183004
2015-02-25Implement a delegate for EmbedderTests.Tom Sepez
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
2015-02-25Kill off unused IFXJS interface methods.Tom Sepez
Re-work of original CL at: https://codereview.chromium.org/933043002/ Much of the IFXJS interface appears completely unused, so Kill off unused IFXJS interface methods. The code itself appears incomplete against all of the objects present in the paths that actually do register objects with JS. R=thestig@chromium.org Review URL: https://codereview.chromium.org/954923004
2015-02-25Fix compilation error on Windows.John Abd-El-Malek
The build fails due to implicit double to integer conversion warning on width *= scale line and warnings being treated as errors. TEST= ninja BUG= none R=jam@chromium.org Review URL: https://codereview.chromium.org/935663003
2015-02-24Add small flate decode unit test.Tom Sepez
As we remove flate encoded sections from test cases (to promote clarity), we should first have a simple unit test for the underlying functionality. R=thestig@chromium.org Review URL: https://codereview.chromium.org/845313006
2015-02-24Kill multi-byte comments in fxet_list.hTom Sepez
No functional changes, just tidying some stray characters, plus kill trailing whitespace while we're at it. TBR=thestig@chromium.org BUG=https://code.google.com/p/pdfium/issues/detail?id=123 Review URL: https://codereview.chromium.org/953143002
2015-02-24Convert pdfium expected test results to PNG format.Tom Sepez
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
2015-02-23Fix GN build after PNG support backportTom Sepez
Follow-on from https://codereview.chromium.org/950113002. This would block a pdfium roll until corrected. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/948233002