diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-09 12:35:01 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-09 12:35:01 -0700 |
commit | 308e05e5f06bd8daabaed12c211f6e072810f8de (patch) | |
tree | 5fa92ed72fb93ff260b22c175f13cb8a775778b5 /testing | |
parent | 1ed2ceb70476b135a3dedbb45549d6b3bc6ecdea (diff) | |
download | pdfium-308e05e5f06bd8daabaed12c211f6e072810f8de.tar.xz |
Consider platform-specific expected .png files.
Rolls DEPS to pull in the first windows-specific .png files, and
unsupresses the corresponding tests.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1072613003
Diffstat (limited to 'testing')
-rw-r--r-- | testing/SUPPRESSIONS_win | 2 | ||||
-rwxr-xr-x | testing/tools/pngdiffer.py | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/testing/SUPPRESSIONS_win b/testing/SUPPRESSIONS_win index 084c22c898..00687fab54 100644 --- a/testing/SUPPRESSIONS_win +++ b/testing/SUPPRESSIONS_win @@ -23,7 +23,5 @@ example_055.pdf example_065.pdf font_1_embedded_font_en_feature.pdf font_2_embedded_font_en_size14.pdf -form_combobox_num.pdf -form_combobox_per.pdf path_5_pattern.pdf test_m.pdf diff --git a/testing/tools/pngdiffer.py b/testing/tools/pngdiffer.py index dc65b4717f..7a7e8ddbc6 100755 --- a/testing/tools/pngdiffer.py +++ b/testing/tools/pngdiffer.py @@ -10,9 +10,11 @@ import sys class PNGDiffer(): ACTUAL_TEMPLATE = '.pdf.%d.png' EXPECTED_TEMPLATE = '_expected' + ACTUAL_TEMPLATE + PLATFORM_EXPECTED_TEMPLATE = '_expected_%s' + ACTUAL_TEMPLATE def __init__(self, finder): self.pdfium_diff_path = finder.ExecutablePath('pdfium_diff') + self.os_name = finder.os_name def HasDifferences(self, input_filename, source_dir, working_dir): input_root, _ = os.path.splitext(input_filename) @@ -20,12 +22,18 @@ class PNGDiffer(): working_dir, input_root + self.ACTUAL_TEMPLATE) expected_path_template = os.path.join( source_dir, input_root + self.EXPECTED_TEMPLATE) + platform_expected_path_template = os.path.join( + source_dir, input_root + self.PLATFORM_EXPECTED_TEMPLATE) i = 0 try: while True: - actual_path = actual_path_template % i; - expected_path = expected_path_template % i; - if not os.path.exists(expected_path): + actual_path = actual_path_template % i + expected_path = expected_path_template % i + platform_expected_path = ( + platform_expected_path_template % (self.os_name, i)) + if os.path.exists(platform_expected_path): + expected_path = platform_expected_path + elif not os.path.exists(expected_path): if i == 0: print "WARNING: no expected results files for " + input_filename break |