Chromium Code Reviews| Index: gm/rebaseline_server/imagepair_test.py |
| diff --git a/gm/rebaseline_server/imagepair_test.py b/gm/rebaseline_server/imagepair_test.py |
| index c82e4b59cd62e0a43de4083c194b7b43514e63a4..400c1d6d076fc3f62ae73a5279ebf30e24655900 100755 |
| --- a/gm/rebaseline_server/imagepair_test.py |
| +++ b/gm/rebaseline_server/imagepair_test.py |
| @@ -21,6 +21,8 @@ import imagepair |
| IMG_URL_BASE = ('http://chromium-skia-gm.commondatastorage.googleapis.com/' |
| 'gm/bitmap-64bitMD5/') |
| +ALT_IMG_URL_BASE = ('http://chromium-skia-gm.commondatastorage.googleapis.com/' |
| + 'test/gm/bitmap-64bitMD5/') |
| class ImagePairTest(unittest.TestCase): |
| @@ -74,6 +76,8 @@ class ImagePairTest(unittest.TestCase): |
| 'imageBUrl': 'arcofzorro/16206093933823793653.png', |
| 'isDifferent': False, |
| }, |
| + # use alternate imageB base url: |
|
epoger
2014/08/21 16:15:22
AFAICT, the different settings for this parameter
rmistry
2014/08/21 18:15:06
This parameter was read and exercised at line 209.
epoger
2014/08/21 18:25:06
I see that the parameter was read, but the paramet
rmistry
2014/08/21 19:07:01
The parameter's value did modify the results of th
epoger
2014/08/21 19:20:30
Ah, so you added a new file to GS ( gs://chromium-
|
| + True, |
|
epoger
2014/08/21 16:15:22
Assuming that this parameter is really being exerc
rmistry
2014/08/21 18:15:06
Used the tuple suggestion. Done.
|
| ], |
| [ |
| @@ -91,13 +95,15 @@ class ImagePairTest(unittest.TestCase): |
| 'perceptualDifference': 0.06620300000000157, |
| 'diffUrl': 'arcofzorro_16206093933823793653_png_png-vs-' + |
| 'arcofzorro_13786535001616823825_png_png.png', |
| - 'whiteDiffUrl': 'arcofzorro_16206093933823793653_png_png' + |
| + 'whiteDiffUrl': 'arcofzorro_16206093933823793653_png_png' + |
| '-vs-arcofzorro_13786535001616823825_png_png.png', |
| }, |
| 'imageAUrl': 'arcofzorro/16206093933823793653.png', |
| 'imageBUrl': 'arcofzorro/13786535001616823825.png', |
| 'isDifferent': True, |
| }, |
| + # use alternate imageB base url: |
| + False, |
| ], |
| [ |
| @@ -141,6 +147,8 @@ class ImagePairTest(unittest.TestCase): |
| 'gradients_degenerate_2pt/11198253335583713230.png', |
| 'isDifferent': True, |
| }, |
| + # use alternate imageB base url: |
| + False, |
| ], |
| # Test fix for http://skbug.com/2368 -- how do we handle an ImagePair |
| @@ -171,6 +179,8 @@ class ImagePairTest(unittest.TestCase): |
| 'imageBUrl': 'nonexistentDir/111111.png', |
| 'isDifferent': True, |
| }, |
| + # use alternate imageB base url: |
| + False, |
| ], |
| # One of the two images is missing, but download_all_images=True so we |
| @@ -187,15 +197,23 @@ class ImagePairTest(unittest.TestCase): |
| 'imageBUrl': 'arcofzorro/13786535001616823825.png', |
| 'isDifferent': True, |
| }, |
| + # use alternate imageB base url: |
| + False, |
| ], |
| ] |
| db = imagediffdb.ImageDiffDB(self.temp_dir) |
| for selftest in selftests: |
| + imageA_base_url = IMG_URL_BASE |
| + if selftest[5]: |
| + imageB_base_url = ALT_IMG_URL_BASE |
| + else: |
| + imageB_base_url = IMG_URL_BASE |
| image_pair = imagepair.ImagePair( |
| image_diff_db=db, |
| - base_url=IMG_URL_BASE, |
| + imageA_base_url=imageA_base_url, |
| + imageB_base_url=imageB_base_url, |
| imageA_relative_url=selftest[0], |
| imageB_relative_url=selftest[1], |
| expectations=selftest[2], |