summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2017-10-30Fix overflow in image size checkRyan Harrison
BUG=chromium:779342 Change-Id: I2a087a08fe87594eb73d9d955955be0e66e5cdc2 Reviewed-on: https://pdfium-review.googlesource.com/17030 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-27Revert "Revert "Reland "Remove ContrastAdjust()."""chromium/3253chromium/3252Henrique Nakashima
This reverts commit 978ba20ffd0d2b37bf02b9d86828fa701c0c02fa. Reason for revert: I now have the new expected files for the chrome test ready in https://chromium-review.googlesource.com/c/chromium/src/+/742061 Landing this again and will immediately add a manual pdfium roll to cl 742061 to unblock the deps roller. Original change's description: > Revert "Reland "Remove ContrastAdjust()."" > > This reverts commit d5ec7ab0cd0663184d6056bc6fc87c86ec345342. > > Reason for revert: Did not mean to reland, just create the reland CL. > > Original change's description: > > Reland "Remove ContrastAdjust()." > > > > Original change's description: > > > Revert "Remove ContrastAdjust()." > > > > > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > > > > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > > > > > Original change's description: > > > > Remove ContrastAdjust(). > > > > > > > > This post-processing increased the contrast of scaled-down features - > > > > mainly lines and fonts, relative to the background. The effect does not > > > > improved readability and in some cases makes the scaled-down version > > > > look like a different document at a glance. Text that is normal > > > > weight appears bold when scaled down in these cases. > > > > > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > > > Reviewed-on: https://pdfium-review.googlesource.com/16970 > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Reviewed-on: https://pdfium-review.googlesource.com/16990 > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > Change-Id: Ie2e91662a1e82c0a793952aab47c2acbde1596d4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/16991 > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: Iaae451131043ee69052809680922fdac06a69458 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16992 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Limit the size of images being fuzzed in XFACodecFuzzersRyan Harrison
This limits the size detected in the header to 1,000,000 pixels, which will support 1000 x 1000 images. This is being done to remove non-useful OOM reports for very large images and improve fuzzing efficiency, since larger images are unlikely to cover new logic. BUG=pdfium:925 Change-Id: I4a7fa7cf02cbb469048b752d45bc9f64a1b60a98 Reviewed-on: https://pdfium-review.googlesource.com/17010 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-10-27Revert "Reland "Remove ContrastAdjust().""Henrique Nakashima
This reverts commit d5ec7ab0cd0663184d6056bc6fc87c86ec345342. Reason for revert: Did not mean to reland, just create the reland CL. Original change's description: > Reland "Remove ContrastAdjust()." > > Original change's description: > > Revert "Remove ContrastAdjust()." > > > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > > > Original change's description: > > > Remove ContrastAdjust(). > > > > > > This post-processing increased the contrast of scaled-down features - > > > mainly lines and fonts, relative to the background. The effect does not > > > improved readability and in some cases makes the scaled-down version > > > look like a different document at a glance. Text that is normal > > > weight appears bold when scaled down in these cases. > > > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > > Reviewed-on: https://pdfium-review.googlesource.com/16970 > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/16990 > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: Ie2e91662a1e82c0a793952aab47c2acbde1596d4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16991 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Reland "Remove ContrastAdjust()."Henrique Nakashima
Original change's description: > Revert "Remove ContrastAdjust()." > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > Original change's description: > > Remove ContrastAdjust(). > > > > This post-processing increased the contrast of scaled-down features - > > mainly lines and fonts, relative to the background. The effect does not > > improved readability and in some cases makes the scaled-down version > > look like a different document at a glance. Text that is normal > > weight appears bold when scaled down in these cases. > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > Reviewed-on: https://pdfium-review.googlesource.com/16970 > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Revert "Remove ContrastAdjust()."Henrique Nakashima
This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. Reason for revert: Breaks PDFToPWGRasterBrowserTest Original change's description: > Remove ContrastAdjust(). > > This post-processing increased the contrast of scaled-down features - > mainly lines and fonts, relative to the background. The effect does not > improved readability and in some cases makes the scaled-down version > look like a different document at a glance. Text that is normal > weight appears bold when scaled down in these cases. > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > Reviewed-on: https://pdfium-review.googlesource.com/15471 > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > Reviewed-by: dsinclair <dsinclair@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 Reviewed-on: https://pdfium-review.googlesource.com/16970 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-10-26Add option to regenerate only platform-specific expected pngs.Henrique Nakashima
Change-Id: Id4798fe9a4d297678a76d0511cde7fecbf130e3e Reviewed-on: https://pdfium-review.googlesource.com/16613 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2017-10-26Remove ContrastAdjust().Henrique Nakashima
This post-processing increased the contrast of scaled-down features - mainly lines and fonts, relative to the background. The effect does not improved readability and in some cases makes the scaled-down version look like a different document at a glance. Text that is normal weight appears bold when scaled down in these cases. Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 Reviewed-on: https://pdfium-review.googlesource.com/15471 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-25Add --regenerate_expected option to test_runner.py.chromium/3250Henrique Nakashima
After a change in rendering, corpus and pixel test expected pngs need to be regenerated manually. This option reduces the toil by automating renaming and moving the new expected files over the old ones. Change-Id: I9d490369ccf946d4d4567e440b7b5252469eec46 Reviewed-on: https://pdfium-review.googlesource.com/16451 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2017-10-24Add more tests for FPDFText methods.Lei Zhang
BUG=pdfium:921 Change-Id: I6973359e6ac112c56843f66eb0b70462f42f9cae Reviewed-on: https://pdfium-review.googlesource.com/16630 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-10-19Implement fuzzer for FormCalc parsingRyan Harrison
This adds a fuzzer that tests the FormCalc parsing code independent of parsing an entire XFA file or performing translation to JS. BUG=pdfium:920 Change-Id: I3d2c336d9cb6f4ebf114ded5f57a44a8342c4228 Reviewed-on: https://pdfium-review.googlesource.com/16391 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-19Implement fuzzer for LZW decompressorRyan Harrison
This adds a fuzzer that tests the LZW decompression code used by our GIF decoder. BUG=pdfium:908 Change-Id: I1381f3ebb2eddf8d2c6f0394b1bb00f67d64a600 Reviewed-on: https://pdfium-review.googlesource.com/16310 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-18Fix rounding of colour valuesDan Sinclair
This CL fixes rounding issues with the colour values when written then read from path objects. Bug: pdfium:919 Change-Id: I8ab33706f1c7d81c3ec755706b1a613cf2a557b3 Reviewed-on: https://pdfium-review.googlesource.com/16270 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-18Refactor HasXFAField into HasFormInfoRyan Harrison
The existing API is too restrictive for collection the metrics information that we want. Specifically it only tells us if there are XFA forms in the document, but not AcroForms. This refactoring makes the method more general, so that non-XFA information is provided also. This change in semantics of the return value required some changes at the call sites of the API. BUG=chromium:775519 Change-Id: Id421c66c09b47196c252c64cdc2c711ca1911de0 Reviewed-on: https://pdfium-review.googlesource.com/16210 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-17Convert XFA Doc Types to be more preciseRyan Harrison
The existing types are PDF, Dynamic & Static, which are poorly named since they don't really convey the fundamental differences between the types. "PDF" is confusing because PDFium only handles PDFs, and "Dynamic" & "Static" describe what a form may do, not how it is specified or some other fundamental difference. The terms "Dynamic" and "Static" were especially confusing, since XFAF documents must be static by definition, whereas full XFA documents can be either dynamic or static, depending on whether or not they change their layout. The types have been renamed to be clear that they are talking about the type of PDF document being described. "PDF" becomes "None", since this is used to indicate that there are no XFA forms in the document. "Dynamic" becomes "Full", since this indicates that the entire XFA spec is being used for the forms, specifically display layout is in the XML. "Static" has become "ForegroundOnly", since the form is specified using the XFAF (XFA Foreground) subset of the spec. The terms Full & Foreground come from the XFA spec. I would have preferred XFAF to have a different name, since it is the display/foreground layer that isn't XFA when using it. BUG=pdfium:917 Change-Id: I4335958c4a11d77d3bbe63b93602dd5bc14acb57 Reviewed-on: https://pdfium-review.googlesource.com/16010 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-29Extract test subclasses of IFX_SeekableReadStreamRyan Harrison
There are multiple instances of subclasses that either act as an invalid stream or one backed by a memory buffer. Merging all of these into two shared stream classes and removing the others. BUG=pdfium:911 Change-Id: I264602808c6dc0e5c878da462a5e00883fe43e51 Reviewed-on: https://pdfium-review.googlesource.com/15093 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-09-28Implement FakeFileAccess.Artem Strygin
Update embedder tests to simulate unavailable data and download requests. Change-Id: I634fa89d2a0c859243e849752936da87568909f4 Reviewed-on: https://pdfium-review.googlesource.com/11890 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-09-27Replace FX_SAFE_STRSIZE with FX_SAFE_SIZE_TRyan Harrison
BUG=pdfium:828 Change-Id: If9560338c456b28f968e743a90a3629791d87df0 Reviewed-on: https://pdfium-review.googlesource.com/14832 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-09-27Remove FX_STRSIZE and replace with size_tRyan Harrison
BUG=pdfium:828 Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16 Reviewed-on: https://pdfium-review.googlesource.com/13230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-26Move font source into CFGAS_FontMgrDan Sinclair
This CL moves the font source into the font manager so it doesn't need to be stored by each caller (and removes the platform dependant code). The |EnumFonts| method is exposed on the CFGAS_FontMgr so the caller can clear the manager if the enumeration fails. Change-Id: Iecce3d2e09ff01152b7bb79a34fe2b728320da9c Reviewed-on: https://pdfium-review.googlesource.com/14816 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-22Fix crash when rendering invalid GIFRyan Harrison
The core fix in this CL is a change to how LWZ decompression works, so that when the min code table size and the color palette size are different, color codes after the end of the defined color palette are considered errors. This CL also introduces a bunch of tweaks to the call return path, since there were multiple locations where the GIF decode failing status was being dropped on the floor, so the end widget would have a bitmap with the default colour in it, instead of nothing. BUG=chromium:616671 Change-Id: Id6f40d552dc24650c91e9903f710ff2fa63bc774 Reviewed-on: https://pdfium-review.googlesource.com/14630 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-20Isolate lcms2 usage to a few files.Lei Zhang
Then set up the right dependencies for them. BUG=chromium:765914 Change-Id: I036cd888c741927d5efe0d020c6676f169e7cbb1 Reviewed-on: https://pdfium-review.googlesource.com/14410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-09-19Remove unneeded core/fxcodec/fx_codec.h includes.chromium/3220Lei Zhang
Change-Id: I703321108712e8c4a11a8343ecf8b1a8804c1d1a Reviewed-on: https://pdfium-review.googlesource.com/14352 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-15OnBeforeKeystroke may invalidate the widget's window.Tom Sepez
And along with it any data that the window may have been carrying. Tidy some return codes while we're at it. Bug: 765384 Change-Id: Id16ec5f82b3d9273ba8f2edb1e4645a9145df4f6 Reviewed-on: https://pdfium-review.googlesource.com/14050 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-09-14Move test/ to testing/resources/xfa/Lei Zhang
This is a directory with manual XFA tests from several years ago. Change-Id: I0c104a99e877ed90095a8a3fa4ad4a9c78323c64 Reviewed-on: https://pdfium-review.googlesource.com/13870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-09-13Change behaviour of FPDF_RenderPageBitmapWithMatrixNicolas Pena
This CL changes the behavior of FPDF_RenderPageBitmapWithMatrix so it transforms the bitmap. Before, the page would be transformed and the assumption was that it would be drawn on a bitmap with the same dimensions as the original page. This does not work well because a transformation generally changes the dimensions of the page. The rectangles test is modified to include small rectangles in the corner of the page, so that it's clear that the whole original page is being displayed. Bug: pdfium:849 Change-Id: Ie89f959a1605fea59a15d239ca871ccd939ec92b Reviewed-on: https://pdfium-review.googlesource.com/13510 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-09-08Store raw json with run results when running safetynet_job.py.Henrique Nakashima
Storing the machine-readable data is a good idea in general, in this case allowing us to create graphs with the historical runs. The json now also contains: - a version number in case there are future changes in the format - the date and time when the run started - which profiler was used - which commits were being compared - whether a comparison was run or not, that is, if the commit hashes for before and after differ Change-Id: I2913beaef30b90669ac4ffe60a656d4b69030588 Reviewed-on: https://pdfium-review.googlesource.com/13370 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-09-06Convert FX_STRSIZE int->size_tRyan Harrison
Change the underlying type for FX_STRSIZE to size_t from int. This will make the value unsigned and thus all values in the range of the type will be valid. This allows for the final remove of negative length strings, but also introduces a some casting and functional errors, since many parts of the code base assume that FX_STRSIZE is int or another signed type. This also CL fixes these errors. BUG=pdfium:828 Change-Id: I231dca59e96fc9330cbb099eecbdfc41fcf86f5b Reviewed-on: https://pdfium-review.googlesource.com/11830 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-05Remove isDevice parameter from barcode Render().Henrique Nakashima
isDevice is currently false in tests and fuzzers and true in real usage. This CL changes it all to true. Change-Id: Idea14795d7f0bb70031e04e5c58e248de72fd39e Reviewed-on: https://pdfium-review.googlesource.com/13130 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-31Remove fx_basic.hDan Sinclair
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-31Implement FORM_OnFocus() API.Lei Zhang
Given a point, if there is an annotation at the point, give if focus if it is not focus already. If there is no annotation at the point, then remove the focus from the focused annotation. BUG=chromium:754594 Change-Id: Iec3070472bbbfbad9d86e517f25da560f82efd4e Reviewed-on: https://pdfium-review.googlesource.com/12530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-30Move CFX_WideTextBuf out of fx_basicDan Sinclair
This CL moves CFX_WideTextBuf to its own files and updates includes as needed. Change-Id: Ibe66ecf3e66f8f01dd8e9eaf6b467588be86ad4f Reviewed-on: https://pdfium-review.googlesource.com/12413 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-30Move CFX_BitStream to its own fileDan Sinclair
This CL moves the CFX_BitStream code out of fx_basic and into cfx_bitstream. Bug: pdfium:867 Change-Id: I5b7e6190a7db1fe1d24feb6bd676035a5c73ee92 Reviewed-on: https://pdfium-review.googlesource.com/12350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-28Move replaced indirect objects to the orphans list.Lei Zhang
ReplaceIndirectObjectIfHigherGeneration() deletes replaced objects, but those objects may be in use. So move them to the orphans list instead to avoid potential dangling pointers. BUG=chromium:757705 Change-Id: Ide83a1b85b754166d298fd50e655ca331ba4f942 Reviewed-on: https://pdfium-review.googlesource.com/11670 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-28Limit pdf_codec_jbig2_fuzzer memory usage.Lei Zhang
BUG=chromium:749610 Change-Id: Ia83558568293398c72b7215e9b3fe4e4df6f969a Reviewed-on: https://pdfium-review.googlesource.com/11931 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-28Limit pdf_jpx_fuzzer memory usage.Lei Zhang
BUG=chromium:738711 Change-Id: I4a308694c3e6fcd17431515b7897969d54486071 Reviewed-on: https://pdfium-review.googlesource.com/11870 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-28Add a global font loader in XFA testsDan Sinclair
This CL creates a global font loader for use in XFA tests. This is needed because the CFGAS_FontMangaer takes a linearly increasing amount of time to load fonts each time it's loaded. This can get excessively slow for test suites which run a lot of tests. Change-Id: Ie389844b56598ce414f4f761654fa4ed465955fd Reviewed-on: https://pdfium-review.googlesource.com/12090 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-24Fix some nits in XFACodecFuzzer.chromium/3196Lei Zhang
Change-Id: Ia9738e14d90a813b6ec7abd72843248fd3a3bff0 Reviewed-on: https://pdfium-review.googlesource.com/11910 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-22Prepare safetynet_job.py to have its output sent in emailsHenrique Nakashima
- Add --no-color option. - Fix exit code ambiguity (2 means bad usage) Change-Id: I04be9c3f21b5a71857b7847b3cc32bf595084994 Reviewed-on: https://pdfium-review.googlesource.com/11490 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-08-15Make errors in called processes more evident and easier to debug.Henrique Nakashima
Also trying to get unicode filenames right again. Change-Id: I501c94921b92b8a8cd6a10441aff1595fc6d878e Reviewed-on: https://pdfium-review.googlesource.com/10630 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-08-11Add 'testing' to a path that got missedRyan Harrison
This applies the proper configuration rules the end HTML generation. Bug: Change-Id: Ica159131e574fd805a1363db5b26a6581ecc0ac6 Reviewed-on: https://pdfium-review.googlesource.com/10810 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-10Add safetynet_job.py to run safetynet_compare.py periodically.chromium/3182Henrique Nakashima
safetynet.job.py verifies if there were performance changes since its last run. Its state is comprised only of the last checkpoint, and is kept in a directory passed by argument. Results of runs are written to this directory as well. Change-Id: I94e0e176b10fd1d2b18d84f82427f63be107ae17 Reviewed-on: https://pdfium-review.googlesource.com/10370 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-10Fixing utf-8 safetynet_conclusions problem when writing the json.Henrique Nakashima
The previous fix (encoding on print) breaks when running compare.py directly. The real problem was in writing the json. Change-Id: Ie4cf926b5c6153731c1ae187ec6a7cffa74ce67b Reviewed-on: https://pdfium-review.googlesource.com/10653 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-10Extracting GetBooleanGnArg from coverage_report.pyHenrique Nakashima
Change-Id: I5475b37aad69361e2e7fae4ce69faf011e3b5c40 Reviewed-on: https://pdfium-review.googlesource.com/10030 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09Fixing PrintConclusionsDictHumanReadable for dicts loaded from string.Henrique Nakashima
json.loads() reads non-ascii filenames to a non-unicode string and an encode step is required before a format. Change-Id: I3145c7aa41e947f78898e73484c3cb1655418689 Reviewed-on: https://pdfium-review.googlesource.com/10410 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09Move tools/coverage to testing/tools/coverageHenrique Nakashima
Change-Id: Icb1d85167a234c9862a4011dea5dfaa09299c71c Reviewed-on: https://pdfium-review.googlesource.com/10431 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09API and test for retrieving image filters from image objectsJane Liu
Added FPDFImageObj_GetImageFilterCount() and FPDFImageObj_GetImageFilters() for retrieving image filters of image objects. * Added a corresponding embedder test. * Changed the filter of an image object in embedded_image.pdf from DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case for images with more than one filter. Bug=pdfium:677 Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962 Reviewed-on: https://pdfium-review.googlesource.com/10130 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-08Move CSS code to coreDan Sinclair
The xfa/fde/css code has no other links into xfa/. This CL moves the css code to core/fxcrt/css and sets to only build when pdf_enable_xfa is enabled. Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be Reviewed-on: https://pdfium-review.googlesource.com/9251 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>