summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
2016-05-04Fix event sending in pdfium_test.tsepez
Passing bad args in pdfium_test -- all void* pointers look alike. Make output less verbose while we're here. Turn on event sending mode for corups tests. No effect until .evt files added to corpus. Review-Url: https://codereview.chromium.org/1946873004
2016-05-04Reland of lax a couple checks to allow certain non-standard PDF files. ↵weili
(patchset #1 id:1 of https://codereview.chromium.org/1946693002/ ) Reason for revert: The culprit was found and confirmed, not this one. Original issue's description: > Revert of Relax a couple checks to allow certain non-standard PDF files. (patchset #1 id:1 of https://codereview.chromium.org/1926823002/ ) > > Reason for revert: > Speculatively revert due to high volume of crashes on Chromium. > > Original issue's description: > > Relax a couple checks to allow certain non-standard PDF files. > > > > Some non-standard PDF files misuse the size of cross reference table, > > and reuse some object number which the old one is still in use. PDFium > > can relax the reusing of xref objects only since it is not referred in > > the pdf document. When the size of cross reference table is larger > > than defined, PDFium will try to continue other than abort. > > > > BUG=chromium:596947 > > > > Committed: https://pdfium.googlesource.com/pdfium/+/cd1e9ff4f432cbc29ed279e6891fb7ddc2ea3734 > > TBR=thestig@chromium.org,dsinclair@chromium.org > # Not skipping CQ checks because original CL landed more than 1 days ago. > BUG=chromium:596947 > > Committed: https://pdfium.googlesource.com/pdfium/+/5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed TBR=thestig@chromium.org,dsinclair@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:596947 Review-Url: https://codereview.chromium.org/1947983002
2016-05-03Revert of Relax a couple checks to allow certain non-standard PDF files. ↵weili
(patchset #1 id:1 of https://codereview.chromium.org/1926823002/ ) Reason for revert: Speculatively revert due to high volume of crashes on Chromium. Original issue's description: > Relax a couple checks to allow certain non-standard PDF files. > > Some non-standard PDF files misuse the size of cross reference table, > and reuse some object number which the old one is still in use. PDFium > can relax the reusing of xref objects only since it is not referred in > the pdf document. When the size of cross reference table is larger > than defined, PDFium will try to continue other than abort. > > BUG=chromium:596947 > > Committed: https://pdfium.googlesource.com/pdfium/+/cd1e9ff4f432cbc29ed279e6891fb7ddc2ea3734 TBR=thestig@chromium.org,dsinclair@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:596947 Review-Url: https://codereview.chromium.org/1946693002
2016-04-30Revert of Allow overriding GN build flags (patchset #2 id:20001 of ↵dsinclair
https://codereview.chromium.org/1923333002/ ) Reason for revert: Blocking the roll Original issue's description: > Allow overriding GN build flags > > In order to enable XFA from GN builds we need to be able to override > pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created > in Chrome. To use that, we have to create a build_overrides/pdfium.gni file > in PDFium that just uses the default values. > > BUG=chromium:62400 > > Committed: https://pdfium.googlesource.com/pdfium/+/1ae572e7e35b52ce4897d1715c005a1b0f79526a TBR=thakis@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1941563002
2016-04-29Relax a couple checks to allow certain non-standard PDF files.weili
Some non-standard PDF files misuse the size of cross reference table, and reuse some object number which the old one is still in use. PDFium can relax the reusing of xref objects only since it is not referred in the pdf document. When the size of cross reference table is larger than defined, PDFium will try to continue other than abort. BUG=chromium:596947 Review-Url: https://codereview.chromium.org/1926823002
2016-04-28Remove output redirect from corpus test runner.dsinclair
The corpus tests redirect output to a string but they just output it later anyway. This CL removes the output redirect and removes the redirect_output flag which will always be False now. Review-Url: https://codereview.chromium.org/1927633002
2016-04-27Allow overriding GN build flagsdsinclair
In order to enable XFA from GN builds we need to be able to override pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created in Chrome. To use that, we have to create a build_overrides/pdfium.gni file in PDFium that just uses the default values. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1923333002
2016-04-27Standardize on ASSERT.dsinclair
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
2016-04-25Combine the javascript and pixel test runners.dsinclair
These runners are very similar in their implementation. Combine them into a single test runner. Corpus will, hopefully, be combined into this test runner in the future. Review URL: https://codereview.chromium.org/1906803005
2016-04-25Standalone GN on macdsinclair
Without the mac_deployment_target_build_override variable in build.gni the following error is produced. ERROR at //build/config/mac/mac_sdk.gni:17:27: Undefined identifier mac_deployment_target = mac_deployment_target_build_override ^----------------------------------- Added needed gtest/gtest_mac.* files. BUG=pdfium:106 Review URL: https://codereview.chromium.org/1907193002
2016-04-22Add a simple check for V4 cross reference tableweili
Some unknown software generates cross reference table with the claimed object numbers are all off by one. Add a simple verification function to detect this scenario, thus have a chance to rebuild the correct cross reference table. To avoid unnecessary checks and potiential performance hit, we only check for the very first non free entry. BUG=602650 Review URL: https://codereview.chromium.org/1910063004
2016-04-21Pixel tests are all generated, not .pdf filesdsinclair
The font_size.pdf file should not have been committed as it will be generated at test time from the .in file. Review URL: https://codereview.chromium.org/1908613004
2016-04-20Upgrade build and clang.dsinclair
The issue with //testing/multiprocess_func_list has been fixed in upstream //build. This Cl upgrades //build to ToT. In order to do so clang must also be updated. The Wno-undefined-var-template is only passed if the pinned clang revision isn't 266460, which is the currently pinned clang revision in chromium. This is there so that the bot that builds with trunk clang gets this flag, but pinned clang doesn't. We accidentally pickup the flag since our pinned clang is different from the Chrome version. So, we must always roll //build and clang together when changing deps or bad things may happen as there is an implicit dependency due to compile flags. BUG=pdfium:106 Review URL: https://codereview.chromium.org/1911483002
2016-04-20Standalone GN build.dsinclair
This CL setups up a standalone GN build. You'll need to set gn args similar to: use_goma = true clang_use_chrome_plugins = false pdf_enable_xfa = true pdf_enable_v8 = true pdf_is_standalone = true The third_party/pymock files are needed to make git cl upload work correctly. BUG=pdfium:106 Review URL: https://codereview.chromium.org/1904563002
2016-04-20Revert of Re-Reland Combined test runner. (patchset #4 id:80001 of ↵dsinclair
https://codereview.chromium.org/1888673003/ ) Reason for revert: Dr.Memory code is wrong..... Original issue's description: > Re-Reland Combined test runner. > > Original Commit Message: > > This CL revives the old CL to combine the test runners [1] which was reverted > due to failing font_size tests. I've deleted the font_size.pdf as it is not > needed and for testing. Pixel tests are either .in or .pdf files, not both. > > Original description: > This CL takes the three test runners (corpus, javascript, pixel) and combines > the code into a single test_runner file. Each of the individual runners still > exists and calls the test runner with their data directory. > > With this change, the pixel and javascript test will now run in parallel if > multiple processors are available. > > 1-https://codereview.chromium.org/1430623006/ > > BUG= > > Committed: https://pdfium.googlesource.com/pdfium/+/84b26ec6ba8193235ce0df817dec5c0f1da29841 TBR=ochang@chromium.org,zhaoqin@chromium.org,tsepez@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1898353004
2016-04-20Re-Reland Combined test runner.dsinclair
Original Commit Message: This CL revives the old CL to combine the test runners [1] which was reverted due to failing font_size tests. I've deleted the font_size.pdf as it is not needed and for testing. Pixel tests are either .in or .pdf files, not both. Original description: This CL takes the three test runners (corpus, javascript, pixel) and combines the code into a single test_runner file. Each of the individual runners still exists and calls the test runner with their data directory. With this change, the pixel and javascript test will now run in parallel if multiple processors are available. 1-https://codereview.chromium.org/1430623006/ BUG= Review URL: https://codereview.chromium.org/1888673003
2016-04-18Exclude XFA-only corpus from non-xfa and roll corpus.tsepez
Test still need modification to process input events. For now, we just suppress anything that diffs. Review URL: https://codereview.chromium.org/1894083003
2016-04-18Allow pdfium_test to send simple events to each page.tsepez
We add the --send-events flag, which causes pdfium_test to look for a .evt file with the same base name as the .pdf file being rendered, and to use its contents to drive calls to FORM_* APIs. The .evt file syntax is crude, roughly: # comments keycode,65 mousedown,right,300,300 # more comments mouseup,right,300,300 mousemove,300,300 Review URL: https://codereview.chromium.org/1898993002
2016-04-15Prevent a potential OOB read in TranslateImageLine.ochang
Fixes a potential mismatch of |m_nComponents| between CPDF_DIBSource and its CPDF_ColorSpace, from code attempting to recover from a failed decoder initialisation in CPDF_DIBSource::CreateDecoder. BUG=chromium:603518 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1892143003
2016-04-15Use platform specific test results as fallback in difference testsweili
So far, we have only two Windows tests require to use platform specific test results due to platform idiosyncracies. However, VS2015 has fixed those issues. So in general, We only need to use platform based results if checking against the regular results failed. Review URL: https://codereview.chromium.org/1892013003
2016-04-13Revert of Reland Combined test runner. (patchset #4 id:60001 of ↵dsinclair
https://codereview.chromium.org/1886753002/ ) Reason for revert: Dr. Memory still broken: https://build.chromium.org/p/client.pdfium/builders/drm_win_xfa/builds/330/steps/pixel%20tests/logs/stdio Original issue's description: > Reland Combined test runner. > > This reverts commit 7a4374583efc0c41c826122aa26c1198c8d5cc37. > > Original Commit Message: > > This CL revives the old CL to combine the test runners [1] which was reverted > due to failing font_size tests. I've deleted the font_size.pdf as it is not > needed and for testing. Pixel tests are either .in or .pdf files, not both. > > Original description: > This CL takes the three test runners (corpus, javascript, pixel) and combines > the code into a single test_runner file. Each of the individual runners still > exists and calls the test runner with their data directory. > > With this change, the pixel and javascript test will now run in parallel if > multiple processors are available. > > 1-https://codereview.chromium.org/1430623006/ > > Committed: https://pdfium.googlesource.com/pdfium/+/9cec54ab0a5461b3075c585f8f233dbfd06c2cbd TBR=tsepez@chromium.org,ochang@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1890703002
2016-04-13Reland Combined test runner.dsinclair
This reverts commit 7a4374583efc0c41c826122aa26c1198c8d5cc37. Original Commit Message: This CL revives the old CL to combine the test runners [1] which was reverted due to failing font_size tests. I've deleted the font_size.pdf as it is not needed and for testing. Pixel tests are either .in or .pdf files, not both. Original description: This CL takes the three test runners (corpus, javascript, pixel) and combines the code into a single test_runner file. Each of the individual runners still exists and calls the test runner with their data directory. With this change, the pixel and javascript test will now run in parallel if multiple processors are available. 1-https://codereview.chromium.org/1430623006/ Review URL: https://codereview.chromium.org/1886753002
2016-04-13Add dummy -j flags to pixel and javascript test runnersdsinclair
This is an intermediate step to creating a unified test runner. We need to update Dr Memory to pass the -j 1 flag to the pixel and javascript tests. In order to do so, we need to have the flag available. The flag will be enabled for pixel and javascript tests when [1] lands. 1- https://codereview.chromium.org/1886753002/ Review URL: https://codereview.chromium.org/1882143005
2016-04-11Fix integer issues leading to out of bounds access in fx_ge_text.cpp.ochang
- Using |-skew| to get positive index, which doesn't work when skew is INT_MIN - Incorrect logic when determining when to use |-skew| as an index. R=tsepez@chromium.org,weili@chromium.org BUG=chromium:601362 Review URL: https://codereview.chromium.org/1875673004
2016-04-08Rename both As{Byte,Wide}StringC() helpers to AsStringC().tsepez
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
2016-04-06Revert of Combined test runner. (patchset #2 id:20001 of ↵dsinclair
https://codereview.chromium.org/1850273003/ ) Reason for revert: Broke Dr. Memory Original issue's description: > Combined test runner. > > This CL revives the old CL to combine the test runners [1] which was reverted > due to failing font_size tests. I've deleted the font_size.pdf as it is not > needed and for testing. Pixel tests are either .in or .pdf files, not both. > > Original description: > This CL takes the three test runners (corpus, javascript, pixel) and combines > the code into a single test_runner file. Each of the individual runners still > exists and calls the test runner with their data directory. > > With this change, the pixel and javascript test will now run in parallel if > multiple processors are available. > > 1-https://codereview.chromium.org/1430623006/ > > Committed: https://pdfium.googlesource.com/pdfium/+/03e8f12cd3788038225d0376a164a9993f6cb720 TBR=tsepez@chromium.org,thestig@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1867643002
2016-04-06Combined test runner.dsinclair
This CL revives the old CL to combine the test runners [1] which was reverted due to failing font_size tests. I've deleted the font_size.pdf as it is not needed and for testing. Pixel tests are either .in or .pdf files, not both. Original description: This CL takes the three test runners (corpus, javascript, pixel) and combines the code into a single test_runner file. Each of the individual runners still exists and calls the test runner with their data directory. With this change, the pixel and javascript test will now run in parallel if multiple processors are available. 1-https://codereview.chromium.org/1430623006/ Review URL: https://codereview.chromium.org/1850273003
2016-04-06Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument.tsepez
Methods that take string arguments and do not persist them should take *StringC types as argument rather than discrete ptr/len args. Avoids a number of implicit casts from CFX_ByteString to char*. BUG= Review URL: https://codereview.chromium.org/1861183002
2016-04-06Move code from fpdfsdk/include to the sub directories.dsinclair
This CL moves the fxedit, jsapi and fpdfxfa code out of fpdfsdk/include to the various sub-include directories. Review URL: https://codereview.chromium.org/1863163002
2016-04-06Move core/include/fxge to core/fxge/include.dsinclair
This CL is a straight move of the fxge includes into core/fxge/include. Review URL: https://codereview.chromium.org/1868533002
2016-04-05Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.tsepez
Companion to https://codereview.chromium.org/1853233002 BUG= Review URL: https://codereview.chromium.org/1857073002
2016-03-29Remove IFDE_XML* classes.dsinclair
The CFDE_XML* classes did not inhert from the IFDE_XML variants but we casted to them anyway. This CL removes the IFDE_XML* variants and we just use the CPDF_XML* classes directly. BUG=pdfium:357 Review URL: https://codereview.chromium.org/1836353002
2016-03-29Add test for util.byteToChar() and fix error msg.tsepez
Review URL: https://codereview.chromium.org/1838543002
2016-03-28Added test for util.printx() and make it match spec.tsepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1837543002
2016-03-28Reduce signed/unsigned comparison warningsWei Li
The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 .
2016-03-25Remove FX_DWORD from fpdfsdk/ and testingtsepez
BUG= Review URL: https://codereview.chromium.org/1835693002
2016-03-25util.printd() replaces specified date with current date.tsepez
Added test case. Several bugs going on here: JS_LocalTime() ignoring argument and returning current time and not factoring in the time zone adjustment. Use of FXSYS_floor() silently casts result to float, losing precision required to extract minutes and seconds. Pre-existing wcsftime escapes not stripped. BUG=pdfium:413 Review URL: https://codereview.chromium.org/1833053002
2016-03-23Move core/include/fxcrt to core/fxcrt/include.Dan Sinclair
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
2016-03-22Fix parsing of double dot operators for FormCalcTom Sepez
Patch by cherycherian. patch from issue 1810153003 at patchset 1 (http://crrev.com/1810153003#ps1) FormCalc expressions containing double-dot operators in SOM expressions were failing since XFA_ResolveNodes_AnyChild was always stripping the leading character. Roll testing/corpus to d671154 to pick up the test. BUG=pdfium:434 TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821413002 .
2016-03-21Fix BUILD.gn for pdf_jpx_fuzzer.Oliver Chang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824643002 .
2016-03-18Add an openjpeg libfuzzer.Oliver Chang
BUG=591789 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1814223003 .
2016-03-14Add missing DEPS files; enable checkdeps.Dan Sinclair
This CL adds the needed DEPS files to make checkdeps pass correctly. The checkdeps PRESUBMIT method has been copied from Chromium and is enabled on CL upload. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801923002 .
2016-03-14Move xfa/src up to xfa/.Dan Sinclair
This CL moves the xfa/src files up to the xfa/ directory and fixes the includes, include guards, and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1803723002 .
2016-03-09Add a pixel test for text rendering regressionWei Li
Code committed at 258f19f makes the test pass. BUG=591137 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1779703003 .
2016-03-09Support clang-cl build on Windows.Oliver Chang
R=thakis@chromium.org, tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/1774123005 .
2016-03-09Review and cleanup lint warnings.Dan Sinclair
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
2016-03-08Remove xfa/src/fxfa/src/common and xfa/src/fxfa/srcDan Sinclair
This Cl moves the code in xfa/src/fxfa/src/common to the diretory which contains the respective implementations and removes the xfa/src/fxfa/src/common directory. It them moves all of the code in xfa/src/fxfa/src up one level and removes the xfa/src/fxfa/src directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1770073003 .
2016-03-03Fix infinite loop for bookmark searchWei Li
BUG=pdfium:420 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1757373002 .
2016-03-03Add JS tests for global const equality.Tom Sepez
Add these tests before fixing bug 419. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1761923002 .
2016-03-03Fix parsing of object numbers > 16,777,216.Dan Sinclair
Currently, there is a check that an object number is <= 0x1000000. If that check fails, we end up putting the parser into a bad state and fail to load documents. The object does not need to be in the XRef table, or referenced from the document, just be in the document. This Cl removes the size check and updates the various atoi calls to use a uint32_t instead of an int32_t so we don't end up getting strange values when converting from a string. BUG=455199 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1755273002 .