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

Unified Diff: gm/rebaseline_server/imagediffdb.py

Issue 287473002: rename rebaseline_server JSON constants to be more consistent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months 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
Index: gm/rebaseline_server/imagediffdb.py
diff --git a/gm/rebaseline_server/imagediffdb.py b/gm/rebaseline_server/imagediffdb.py
index 3b1eb3ebc032a804b444c453dd28f9ed4cc06307..a37e8ce9569e2f9a3498fc7b5610383ba38d5a2b 100644
--- a/gm/rebaseline_server/imagediffdb.py
+++ b/gm/rebaseline_server/imagediffdb.py
@@ -45,11 +45,11 @@ VALUES_PER_BAND = 256
# Keys used within DiffRecord dictionary representations.
# NOTE: Keep these in sync with static/constants.js
-KEY__DIFFERENCE_DATA__MAX_DIFF_PER_CHANNEL = 'maxDiffPerChannel'
-KEY__DIFFERENCE_DATA__NUM_DIFF_PIXELS = 'numDifferingPixels'
-KEY__DIFFERENCE_DATA__PERCENT_DIFF_PIXELS = 'percentDifferingPixels'
-KEY__DIFFERENCE_DATA__PERCEPTUAL_DIFF = 'perceptualDifference'
-KEY__DIFFERENCE_DATA__WEIGHTED_DIFF = 'weightedDiffMeasure'
+KEY__DIFFERENCES__MAX_DIFF_PER_CHANNEL = 'maxDiffPerChannel'
+KEY__DIFFERENCES__NUM_DIFF_PIXELS = 'numDifferingPixels'
+KEY__DIFFERENCES__PERCENT_DIFF_PIXELS = 'percentDifferingPixels'
+KEY__DIFFERENCES__PERCEPTUAL_DIFF = 'perceptualDifference'
+KEY__DIFFERENCES__WEIGHTED_DIFF = 'weightedDiffMeasure'
class DiffRecord(object):
@@ -206,12 +206,12 @@ class DiffRecord(object):
"""Returns a dictionary representation of this DiffRecord, as needed when
constructing the JSON representation."""
return {
- KEY__DIFFERENCE_DATA__NUM_DIFF_PIXELS: self._num_pixels_differing,
- KEY__DIFFERENCE_DATA__PERCENT_DIFF_PIXELS:
+ KEY__DIFFERENCES__NUM_DIFF_PIXELS: self._num_pixels_differing,
+ KEY__DIFFERENCES__PERCENT_DIFF_PIXELS:
self.get_percent_pixels_differing(),
- KEY__DIFFERENCE_DATA__WEIGHTED_DIFF: self.get_weighted_diff_measure(),
- KEY__DIFFERENCE_DATA__MAX_DIFF_PER_CHANNEL: self._max_diff_per_channel,
- KEY__DIFFERENCE_DATA__PERCEPTUAL_DIFF: self._perceptual_difference,
+ KEY__DIFFERENCES__WEIGHTED_DIFF: self.get_weighted_diff_measure(),
+ KEY__DIFFERENCES__MAX_DIFF_PER_CHANNEL: self._max_diff_per_channel,
+ KEY__DIFFERENCES__PERCEPTUAL_DIFF: self._perceptual_difference,
}

Powered by Google App Engine
This is Rietveld 408576698