Index: gm/rebaseline_server/imagediffdb_test.py |
diff --git a/gm/rebaseline_server/imagediffdb_test.py b/gm/rebaseline_server/imagediffdb_test.py |
index 558a816a02cbbb6a05dea1bd9884c7e6d6cd4049..b1d534a5e06ccb7b463809eaee6492691725e202 100755 |
--- a/gm/rebaseline_server/imagediffdb_test.py |
+++ b/gm/rebaseline_server/imagediffdb_test.py |
@@ -19,7 +19,8 @@ import unittest |
import imagediffdb |
-IMG_URL_BASE = 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm/bitmap-64bitMD5/' |
+IMG_URL_BASE = ('http://chromium-skia-gm.commondatastorage.googleapis.com/gm/' |
+ 'bitmap-64bitMD5/') |
class ImageDiffDbTest(unittest.TestCase): |
@@ -56,21 +57,22 @@ class ImageDiffDbTest(unittest.TestCase): |
# 3. actual image URL |
# 4. expected percent_pixels_differing (as a string, to 4 decimal places) |
# 5. expected weighted_diff_measure (as a string, to 4 decimal places) |
- # 6. expected max_diff_per_channel |
+ # 6. expected perceptual difference (as a string, to 4 decimal places) |
+ # 7. expected max_diff_per_channel |
selftests = [ |
[ |
'arcofzorro/16206093933823793653', |
IMG_URL_BASE + 'arcofzorro/16206093933823793653.png', |
'arcofzorro/13786535001616823825', |
IMG_URL_BASE + 'arcofzorro/13786535001616823825.png', |
- '0.0662', '0.0113', [255, 255, 247], |
+ '0.0662', '0.0113', '0.0662', [255, 255, 247], |
], |
[ |
'gradients_degenerate_2pt/10552995703607727960', |
IMG_URL_BASE + 'gradients_degenerate_2pt/10552995703607727960.png', |
'gradients_degenerate_2pt/11198253335583713230', |
IMG_URL_BASE + 'gradients_degenerate_2pt/11198253335583713230.png', |
- '100.0000', '66.6667', [255, 0, 255], |
+ '100.0000', '66.6667', '100.0000', [255, 0, 255], |
], |
] |
@@ -88,7 +90,8 @@ class ImageDiffDbTest(unittest.TestCase): |
self.assertEqual('%.4f' % record.get_percent_pixels_differing(), |
selftest[4]) |
self.assertEqual('%.4f' % record.get_weighted_diff_measure(), selftest[5]) |
- self.assertEqual(record.get_max_diff_per_channel(), selftest[6]) |
+ self.assertEqual('%.4f' % record.get_perceptual_difference(), selftest[6]) |
+ self.assertEqual(record.get_max_diff_per_channel(), selftest[7]) |
def main(): |