summaryrefslogtreecommitdiff
path: root/testing/resources
AgeCommit message (Collapse)Author
2018-08-01Bounds check lineSrc in JBig2_Image.cpp.Tom Sepez
No matter how the dimensions might be determined, we know the hard end of the source line, and can use it for a bounds check. We expect the size is quantized to a multiple of m_stride, so as long as each block operates within an m_stride, the initial check should be sufficient. Bug: 867501 Change-Id: Iaf9936557b856f3eb09fef522f3e6738aa4f38f0 Reviewed-on: https://pdfium-review.googlesource.com/39310 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-01Add FPDFText_GetFontName() APIMiklos Vajna
This follows the same pattern as DefaultGetFaceName(), so the client has to call this function twice, but allocation of the string buffer happens outside pdfium. Change-Id: I06b7dcd00aca9b9b94799dad3f139617d7f5451e Reviewed-on: https://pdfium-review.googlesource.com/38870 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-07-27Make pixel_tests pass on Windows 10.Lei Zhang
BUG=chromium:828177 NOTRY=true Change-Id: I94de26cf74b27b7c71795a2ee189c9c6b4c56ac6 Reviewed-on: https://pdfium-review.googlesource.com/38903 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-07-25Fix hint tables parsing.Artem Strygin
Sample PDF: https://yadi.sk/d/oWLtAEfy3YbEb3 For offsets, equal to the hint stream offset, added hint stream length to determine the actual offset, because linearization inserted the hint stream at the original location of the object. Also the number of bits needed to represent the numerator of the fractional position for each shared object reference may be zero, if each shared group contains only one object with obj num, incremented on 1. Change-Id: I4754d603f388354821e8d0cac97ad99a7578fe4b Reviewed-on: https://pdfium-review.googlesource.com/36610 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-19Fix unbalanced endobj keyword in rectangles_multi_pages.pdf.Lei Zhang
Also add stream lengths. Change-Id: I7a1f565f941f9100058fab0f1ddde5471318f4d3 Reviewed-on: https://pdfium-review.googlesource.com/38350 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-11Add FPDFFormObj_CountObjects() APIMiklos Vajna
To find out the number of sub-objects a form object has, similar to how FPDFPage_CountObjects() does it for page objects. Change-Id: I7e5775dece42b74fd5b71b1d9622a1aa37bf64ac Reviewed-on: https://pdfium-review.googlesource.com/37316 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2018-07-10Add test for reading marked content with an indirect dict.Henrique Nakashima
Bug: pdfium:1118 Change-Id: I2e9adaae64cba5b3915c19f3c99743cddbe58736 Reviewed-on: https://pdfium-review.googlesource.com/37371 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-07-03Add FPDFText_GetTextRenderMode() APIMiklos Vajna
This allows deciding if FPDFPageObj_GetFillColor() or FPDFPageObj_GetStrokeColor() should be used to get the effective color of a text object. Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae Reviewed-on: https://pdfium-review.googlesource.com/36750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-06-26Write pixel .evt test for dynamic_list_box_allow_multiple_selection.Henrique Nakashima
Improve the .evt mechanism to accept mouse clicks with modifiers (such as shift). Bug: pdfium:1105 Change-Id: I6e9c2c1f66b7fde250b55b41ccdf115a311f44f7 Reviewed-on: https://pdfium-review.googlesource.com/36091 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-06-23Fix some nits from commit 27cf78d8.chromium/3472chromium/3471Lei Zhang
Change-Id: I52d7b9692c19af1aafab7d572d0a274726bd37f5 Reviewed-on: https://pdfium-review.googlesource.com/35911 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-06-20Re-work some more c_str() usage.Tom Sepez
Many of these are converting ByteString => c_str => ByteStringView, since the ByteStringView ctor is implicit. This is unfortunate, since that involves a strlen() which the ByteString already knows if we use AsStringView() instead. This changed one test result where we can now return the string "\0" instead of "" -- since strlen no longer eats the NUL. This seems consistent, say, with String.fromCharCode(). Change-Id: I17f68d1a1f4b352960208f9148e68ab4c4d78bd2 Reviewed-on: https://pdfium-review.googlesource.com/35590 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-14Rewrite content stream regeneration.Henrique Nakashima
Loop through the dirty page objects and streams and regenerate all streams that are dirty. Bug: pdfium:1051 Change-Id: I837b5a7cd9542b7777e7c7ae7ac9cc75f69f30b5 Reviewed-on: https://pdfium-review.googlesource.com/34330 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-12Fill m_ContentStream field in CPDF_PageObject.Henrique Nakashima
From the comment of CPDF_PageObject::GetContentStream(): """ Get what content stream the object was parsed from in its page. This number is the index of the content stream in the "Contents" array, or 0 if there is a single content stream. If the object is newly created, -1 is returned. If the object is spread among more than one content stream, this is the index of the last one. """ Bug: pdfium:1051 Change-Id: I9f7804af4f263dda0422e9542e025e3320ff7c31 Reviewed-on: https://pdfium-review.googlesource.com/34250 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-08Ensure CJS_Return() with error always includes a message.Tom Sepez
Change the signature of the constructors to make it impossible to do this otherwise. Change-Id: I14e88d98a1128f2d599459ce9337cd6d079469fe Reviewed-on: https://pdfium-review.googlesource.com/34531 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-08Use FPDFText_GetBoundedText() to get the visible text in a test.Lei Zhang
Add a test PDF with multiple pages, each with a different media box and crop box. Demonstrate how FPDFText_GetText() gets all the text on the page, and how FPDFText_GetBoundedText() with the right bounding boxes gets only the visible text on the page. Also fix a small nit in CPDF_TextPage::GetTextByRect() found while writing this CL. BUG=pdfium:387 Change-Id: I9ce4bb181e2ba5b454ea1341bbccef9ba94c9cd8 Reviewed-on: https://pdfium-review.googlesource.com/34550 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-06-07Add expectations for xfa_node_caption.pdfchromium/3453Ryan Harrison
This test appears to just be confirming that caption layout and content can be controlled via JS. Specifically there is a bunch of listeners for the initialize event that run and setup the page by inspecting and changing values. Clicking and such does nothing interesting, so there is no .evt. BUG=pdfium:1020 Change-Id: I1a24dc6fab058c17362506cce1f184e62dd82500 Reviewed-on: https://pdfium-review.googlesource.com/34491 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-07Convert resolve_nodes.pdf into 3 test casesRyan Harrison
There are 3 elements in the PDF that can be interacted with that cause testable output. This CL creates test cases for each of these elements. 2 of them work correctly, and a new bug, pdfium:1106, has been filed for the third. BUG=pdfium:1020 Change-Id: I524911d03927a0eeeee1d1479e1a855f90269e8e Reviewed-on: https://pdfium-review.googlesource.com/34370 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-06Unsuppress dynamic_password_field_background_fill.pdfRyan Harrison
This CL creates a .evt and expectation image for this test. This test has a variety of password entry fields with different backgrounds and enters text into them. BUG=pdfium:1020 Change-Id: Icaa695670e8a773e066aec2251658a11c3e8ca3b Reviewed-on: https://pdfium-review.googlesource.com/34214 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-06Create events and expectation for barcode_test.pdfRyan Harrison
This adds a test where a known value is used as a seed for generating a barcode and confirming that the generated barcode is consistent. BUG=pdfium:1020 Change-Id: I61ed37a8591f0efe40a8d4ab1d6024bb1489ef25 Reviewed-on: https://pdfium-review.googlesource.com/34030 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-31Make XFA pixel tests more stablechromium/3447Ryan Harrison
When generating PDFs using the fixup script and a .in, specify them to to use Ahem.ttf as the text font. Ahem is a font designed to reduce flakiness in pixel tests due to font rendering differences between platforms. Specifically the glyphs in the font are standard size black boxes, so though the specific text content cannot be easily compared, things like layout and high level changes to the content can still be tested. Testing things like specific text changes should be done via an embedder test, where the strings in the elements can be extracted and inspected. The font itself is is CID type 2 font, which is relatively complex to correctly embed in a PDF due to subsetting and other features. Instead of embedding it in the generated PDFs, which was originally attempted, it is being supplied to pdfium_test via the --font-dir flag. This flag overrides where the binary looks for system fonts. This works correctly on Mac and Linux, but not on Windows, which is why that platform remains suppressed. BUG=pdfium:1008,pdfium:1020 Change-Id: I00811536de98f736fc599d96b397194ccf8db0cd Reviewed-on: https://pdfium-review.googlesource.com/27790 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-31Handle image mask continuous loading correctlyWei Li
When image mask doesn't need multi-steps to load, ContinueLoadMaskDIB() will return LoadState::kFail as result. For this case, the loading should continue as usual instead of aborting. BUG=pdfium:1087 Change-Id: I5c43a67e43469ac7febca4c0cf1faa96ee105206 Reviewed-on: https://pdfium-review.googlesource.com/33310 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Wei Li <weili@chromium.org>
2018-05-31Fix font regression in AdjustMMParamsNicolas Pena
Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to unsigned, but this means that dest_width - min_width becomes unsigned, which is wrong because the subtraction could be negative. This CL fixes this bug. Bug: chromium:845697 Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0 Reviewed-on: https://pdfium-review.googlesource.com/33150 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-30Add pixel tests for PDFs that use generation numbers.Lei Zhang
This checks in 2 identical looking PDFs. They both started out as hello_world.pdf. They were then hand edited in different ways that results in the same final rendering output. Change-Id: Ib3b634a5119c0f2e4beb36844c3f2b8d58ab8a21 Reviewed-on: https://pdfium-review.googlesource.com/33232 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-22Fix a regression with missing text.Lei Zhang
Commit 10e1f05a incorrectly removed a font weight sanitizing step in the font substitution code. BUG=chromium:820345 Change-Id: I876f65a5649270648616f561eaad17ee333b9a9e Reviewed-on: https://pdfium-review.googlesource.com/32832 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-22Add test case for a font substitution regression.Lei Zhang
BUG=chromium:820345 Change-Id: Ia3adb6a7565e12f3d5e129e2babb4b8628028269 Reviewed-on: https://pdfium-review.googlesource.com/32810 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-15Use {{streamlen}} macro in testing/resources/javascript/*.inTom Sepez
Change-Id: I1d2a91619a1c944b6fdca00b2f9c5bb338326986 Reviewed-on: https://pdfium-review.googlesource.com/32572 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-15Use {{trailer}} macro in testing/resources/javascript/*.inTom Sepez
Also format the trailer in a cleaner multi-line format. Change-Id: If145834b56f8678f97247b346cc0cfd4d367c501 Reviewed-on: https://pdfium-review.googlesource.com/32571 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-15Test app.beep() in standalone PDFium.Tom Sepez
Precursor to testing app.beep() in chrome's browser tests. Change-Id: I09ef497bd6a8094e389783b144fa04c9230cbe3d Reviewed-on: https://pdfium-review.googlesource.com/32550 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-08Add some basic tests for FPDF_VIEWERREF_GetPrintPageRange().Lei Zhang
Hand edit viewer_ref.pdf to have a page range and more pages. Fix an invalid stream length in the file as well. Fix tests that depended on viewer_ref.pdf having only 1 page. Change-Id: I95d5cbf1f592d1c51f11d9ab5b26abf2f23ed598 Reviewed-on: https://pdfium-review.googlesource.com/32172 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-07Restore logic of CreateChildUIAndValueNodesIfNeeded().Henrique Nakashima
CreateUIChild() was changed and renamed to CreateChildUIAndValueNodesIfNeeded() in: https://pdfium-review.googlesource.com/c/pdfium/+/24390 This caused some bugs but it's too far back for a rollback. This cl restores the logic of CreateUIChild() keeping the new signature. Bug: chromium:838994 Change-Id: I44ce741fdb90f8b0fd11379b5e881e376c307f0c Reviewed-on: https://pdfium-review.googlesource.com/32090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-27Fix backspace on 1st character of a line erases the line break.Henrique Nakashima
Bug: chromium:836361 Change-Id: I39a0a3f9cb59ceb81f944dd5d0d4fd38a2e18a6b Reviewed-on: https://pdfium-review.googlesource.com/31411 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Create FPDFPageObjMark_GetParamStringValue().Henrique Nakashima
Bug: pdfium:1037 Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c Reviewed-on: https://pdfium-review.googlesource.com/31190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Create API to get PageObject mark parameters.Henrique Nakashima
New calls added in this cl: - FPDFPageObjMark_GetParamKey - FPDFPageObjMark_GetParamValueType - FPDFPageObjMark_GetParamIntValue Bug: pdfium:1037 Change-Id: Iedb74ddbf8a5483de62094ec295dadd6367d5175 Reviewed-on: https://pdfium-review.googlesource.com/30912 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-13Add test for circular CPDF_Function::Load().Henrique Nakashima
Bug: chromium:830221 Change-Id: Ia96086a1b930600a4fb9054123c867d1c8b301eb Reviewed-on: https://pdfium-review.googlesource.com/30671 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-11Fix crash when ColorSpace references itself directly.Henrique Nakashima
Also fixes any problems with cycles between colorspaces. Past fixes have solved problems with CPDF_DocPageData::GetColorSpace() calling itself and CPDF_DocPageData::GetColorSpace() calling CPDF_ColorSpace::Load() and vice versa. They have not solved CPDF_ColorSpace::Load() calling itself. This CL repurposes the |pVisited| set to ensure CPDF_ColorSpace::Load() does not try to load a colorspace as a dependency of itself and creates |pVisitedLocal| to ensure CPDF_DocPageData::GetColorSpace() does not create a similar circular dependency not involving CPDF_ColorSpace::Load(). Bug: chromium:828206 Change-Id: Ib2d0ec494be169135607f3651e0f70627b26ebd7 Reviewed-on: https://pdfium-review.googlesource.com/29810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-05Ignore bad data in the shared object hint table.Lei Zhang
Currently this is being treated as a case of "data not available" which leads to an infinite loop. BUG=pdfium:1055 Change-Id: I2722a5b364d56a4ad5b7cca2a4b42e6b13a933f4 Reviewed-on: https://pdfium-review.googlesource.com/29831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-03Off-by-one in CPDF_StreamParser::ParseNextElement()Tom Sepez
Limit the token to 255 bytes + NUL. Also, shuffle fields in cpdf_streamparser to allow memory tools to better check this inline array. Bug: 828049 Change-Id: I444f2b4c6958167577d9cd76c06805baf7d5c26c Reviewed-on: https://pdfium-review.googlesource.com/29530 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-03-27Open FPDF_PAGEOBJECTMARK API.Henrique Nakashima
Initially it contains: - FPDFPageObj_CountMarks - FPDFPageObj_GetMark - FPDFPageObjMark_GetName This allows reading the content marks from a page object. Bug: pdfium:1037 Change-Id: I3d7554b71f938778890fdb44088e0d45dd2718d9 Reviewed-on: https://pdfium-review.googlesource.com/28710 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-03-21Add a regression test for bug 821454.Lei Zhang
WideString::Compare() went bad but no embedder test failed. Improve coverage by hand crafting a PDF similar to the sample PDF in the bug report. BUG=chromium:823369 Change-Id: I267f53ba3ef7612bf54771a85f8305b2cbc3cfcb Reviewed-on: https://pdfium-review.googlesource.com/28910 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-19Calculate AP for multi-line markup annotations correctlyRalf Sippl
Currently, when constructing AP for multi-line markup annotations, we only take into account the first set of quadpoints, resulting in only the first line of the annotation being displayed if the annotation spans multiple lines. This CL, initially written by Jane Liu <janeliulwq@google.com> (https://pdfium-review.googlesource.com/12010) takes into account all the quadpoints, so multi-line annotations can be displayed correctly. BUG=pdfium:876 Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7 Reviewed-on: https://pdfium-review.googlesource.com/28590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-19Add more options to combobox_form.pdf resource.Henrique Nakashima
This causes a scrollbar to appear. We need a test case that contains an AcroForm combobox with a popup that is large enough to create a scrollbar. Bug: chromium:823378, chromium:820278 Change-Id: I6e93bda5b938f9f7c08ceeef7989794ea7764532 Reviewed-on: https://pdfium-review.googlesource.com/28750 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-03-12Add test that non-ASCII characters to not foul hyphen processingRyan Harrison
In this doc there is a hyphen followed a fi ligature. Older versions of PDFium were not inserting the appropriate soft hyphen marker (0x0002) at this point, since they were only checking for ASCII characters. That bug is fixed in the preceding CLs, so this test is being added to avoid regressions. BUG=pdfium:1029 Change-Id: I9c9906de5a13ade1400a589fb18967938150516d Reviewed-on: https://pdfium-review.googlesource.com/28470 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-28Add simple XFA test for entering text into TextEditRyan Harrison
BUG=pdfium:1008,pdfium:1020 Change-Id: I607b9327252ff836ad78a55659b1d40bc2797906 Reviewed-on: https://pdfium-review.googlesource.com/27771 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-27Move XFA pixel tests under pixel/chromium/3358chromium/3357Ryan Harrison
This removes the need for them to have their own runner. Due to other upstream changes some of the expectation files needed to be updated. The suppressions have been updated to make sure the tests do not run for non-XFA builds. Having these tests run on the bots surfaced an MSAN issue in the XFA code, which is fixed in this CL. BUG=pdfium:1020,pdfium:1008 Change-Id: I44e2fa1cba2d07f30f56f5792749acbe1ebf4b62 Reviewed-on: https://pdfium-review.googlesource.com/27710 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-26Fixup AFSimple_Calculate indexing bugDan Sinclair
The refactoring in [1] introduced a bug where we pulled the wrong array index to get the array of fields to use in the AFSimple_Calculate method. This caused the calculation to not be performed as the fields could not be found. This CL fixes up the index and adds a test to verify we use AFSimple_Calucate to sum two fields. 1- https://pdfium-review.googlesource.com/c/pdfium/+/16670 Bug: chromium:811913 Change-Id: I2abb9fe4fe2d6969ce1876736faadf252ef90575 Reviewed-on: https://pdfium-review.googlesource.com/27670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-02-25Add expectations for static XFA testsRyan Harrison
BUG=pdfium:1008,pdfium:1020 Change-Id: I1f14f249bfc253bacf84219221c3f749308b556f Reviewed-on: https://pdfium-review.googlesource.com/27650 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-23Setup testing XFA using .in fileschromium/3355chromium/3354Ryan Harrison
This adds a number of {{}} style tags to the .in format that allow the fix-up script to inject XFA related boilerplate into the PDF, instead of having the .in file replicate this. A simple example XFA .in file, called xfa_example.in has been added as a template for future files to follow. Finally a run_xfa_tests.py has been added for executing all of the tests in testing/resources/xfa, which from what I can tell are not executed any other way. All of the existing PDFs in that directory are currently suppressed. BUG=pdfium:1008 Change-Id: Ie055b6640969ce8291b4c96b401ebf6887dfa0c0 Reviewed-on: https://pdfium-review.googlesource.com/27631 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-13Teach fixup_pdf_template.py to automatically calculate stream length.Lei Zhang
BUG=pdfium:1008 Change-Id: I5136d57bd401d44b56ac19e5cfb52702afa32200 Reviewed-on: https://pdfium-review.googlesource.com/26651 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-02-06Add rendering embeddertests for FPDF_ImportNPagesToOne.xlou
One test is added to render the output pdf of FPDF_ImportNPagesToOne, and check the width, height and hash value of the rendered image. Change-Id: Idd3f953d62ecd4e85ad52a9323eb13243dc49597 Reviewed-on: https://pdfium-review.googlesource.com/25330 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-01Make CFXJSE-created contexts refer to their CFXJS counteparts.chromium/3337Tom Sepez
Bug: 773229 Change-Id: Ic3774c7f6abe3a195bbe09b91d91c549d4d7ac46 Reviewed-on: https://pdfium-review.googlesource.com/25110 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>