Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: gm/rebaseline_server/imagediffdb_test.py

Issue 82823005: rebaseline_server: improve pixel diff reporting (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: partially_deobfuscate Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/imagediffdb.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/imagediffdb_test.py
===================================================================
--- gm/rebaseline_server/imagediffdb_test.py (revision 12361)
+++ gm/rebaseline_server/imagediffdb_test.py (working copy)
@@ -30,12 +30,22 @@
# 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
selftests = [
- ['16206093933823793653',
- IMAGE_URL_BASE + 'arcofzorro/16206093933823793653.png',
- '13786535001616823825',
- IMAGE_URL_BASE + 'arcofzorro/13786535001616823825.png',
- '0.0653', '0.0113'],
+ [
+ '16206093933823793653',
+ IMAGE_URL_BASE + 'arcofzorro/16206093933823793653.png',
+ '13786535001616823825',
+ IMAGE_URL_BASE + 'arcofzorro/13786535001616823825.png',
+ '0.0662', '0.0113', [255, 255, 247],
+ ],
+ [
+ '10552995703607727960',
+ IMAGE_URL_BASE + 'gradients_degenerate_2pt/10552995703607727960.png',
+ '11198253335583713230',
+ IMAGE_URL_BASE + 'gradients_degenerate_2pt/11198253335583713230.png',
+ '100.0000', '66.6667', [255, 0, 255],
+ ],
]
# Add all image pairs to the database
@@ -51,7 +61,7 @@
actual_image_locator=selftest[2])
assert (('%.4f' % record.get_percent_pixels_differing()) == selftest[4])
assert (('%.4f' % record.get_weighted_diff_measure()) == selftest[5])
-
+ assert (record.get_max_diff_per_channel() == selftest[6])
logging.info("Self-test completed successfully!")
« no previous file with comments | « gm/rebaseline_server/imagediffdb.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698