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

Unified Diff: gm/rebaseline_server/imagepairset.py

Issue 197213033: rebaseline_server: serve JSON from static file, rather than generating it live (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | gm/rebaseline_server/imagepairset_test.py » ('j') | gm/rebaseline_server/server.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/imagepairset.py
diff --git a/gm/rebaseline_server/imagepairset.py b/gm/rebaseline_server/imagepairset.py
index 48c30647183e27736b44f46636b63231bd0beaa9..04aea903423bb05e70eeef94ad7df81da0902d75 100644
--- a/gm/rebaseline_server/imagepairset.py
+++ b/gm/rebaseline_server/imagepairset.py
@@ -28,7 +28,6 @@ KEY__IMAGESETS__SET__IMAGE_B = 'imageB'
KEY__IMAGESETS__SET__WHITEDIFFS = 'whiteDiffs'
DEFAULT_DESCRIPTIONS = ('setA', 'setB')
-DIFF_BASE_URL = '/static/generated-images'
class ImagePairSet(object):
@@ -40,9 +39,10 @@ class ImagePairSet(object):
- or any other pairwise set of images.
"""
- def __init__(self, descriptions=None):
+ def __init__(self, diff_base_url, descriptions=None):
"""
Args:
+ diff_base_url: base URL indicating where diff images can be loaded from
descriptions: a (string, string) tuple describing the two image sets.
If not specified, DEFAULT_DESCRIPTIONS will be used.
"""
@@ -52,7 +52,7 @@ class ImagePairSet(object):
# -> instances_per_value
self._image_pair_dicts = []
self._image_base_url = None
- self._diff_base_url = DIFF_BASE_URL
+ self._diff_base_url = diff_base_url
def add_image_pair(self, image_pair):
"""Adds an ImagePair; this may be repeated any number of times."""
« no previous file with comments | « no previous file | gm/rebaseline_server/imagepairset_test.py » ('j') | gm/rebaseline_server/server.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698