diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-18 16:43:41 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-18 21:20:38 +0000 |
commit | aeadad1dfb7e4d3582d63dacd2ecbed71a5dd4ec (patch) | |
tree | df7c1d038a1843585ac5956829d31c5c4fc9bc74 /testing/tools | |
parent | 7d0af80637afbc673e4bc9a34bcb556afdf3434d (diff) | |
download | pdfium-aeadad1dfb7e4d3582d63dacd2ecbed71a5dd4ec.tar.xz |
Make progressive renderer default for pdfium_test.
When Chrome renders PDF pages it uses the progressive renderer. The one
shot renderer is used to render print preview pages. This CL changes
pdfium_test to use the progressive renderer by default to better match
Chrome. This also adds a --render-oneshot flag which will use the
non-progressive renderer.
Bug: chromium:736695
Change-Id: If79333ae10a0ed1c9bce1290caad8d531e6709aa
Reviewed-on: https://pdfium-review.googlesource.com/8130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/tools')
-rwxr-xr-x | testing/tools/run_corpus_tests.py | 1 | ||||
-rw-r--r-- | testing/tools/test_runner.py | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/testing/tools/run_corpus_tests.py b/testing/tools/run_corpus_tests.py index 5932685f32..1175de497c 100755 --- a/testing/tools/run_corpus_tests.py +++ b/testing/tools/run_corpus_tests.py @@ -10,6 +10,7 @@ import test_runner def main(): runner = test_runner.TestRunner('corpus') runner.SetEnforceExpectedImages(True) + runner.SetOneShotRenderer(True) return runner.Run() if __name__ == '__main__': diff --git a/testing/tools/test_runner.py b/testing/tools/test_runner.py index 8f0670d33b..9524b7459b 100644 --- a/testing/tools/test_runner.py +++ b/testing/tools/test_runner.py @@ -40,6 +40,7 @@ class TestRunner: def __init__(self, dirname): self.test_dir = dirname self.enforce_expected_images = False + self.oneshot_renderer = False # GenerateAndTest returns a tuple <success, outputfiles> where # success is a boolean indicating whether the tests passed comparison @@ -125,6 +126,8 @@ class TestRunner: cmd_to_run = [self.pdfium_test_path, '--send-events', '--png'] if self.gold_results: cmd_to_run.append('--md5') + if self.oneshot_renderer: + cmd_to_run.append('--render-oneshot') cmd_to_run.append(pdf_path) return common.RunCommandExtractHashedFiles(cmd_to_run) @@ -302,3 +305,7 @@ class TestRunner: def SetEnforceExpectedImages(self, new_value): """Set whether to enforce that each test case provide an expected image.""" self.enforce_expected_images = new_value + + def SetOneShotRenderer(self, new_value): + """Set whether to use the oneshot renderer. """ + self.oneshot_renderer = new_value |