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

Unified Diff: gm/rebaseline_server/imagepair.py

Issue 479613002: Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix render_pictures_test after rebase Created 6 years, 4 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 | « gm/rebaseline_server/compare_to_expectations.py ('k') | gm/rebaseline_server/imagepair_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/imagepair.py
diff --git a/gm/rebaseline_server/imagepair.py b/gm/rebaseline_server/imagepair.py
index 0ac0c4213883568a01fbbea8cbdae69fd1416f09..e85c21948bfdc6ed683e4cd0977cc8f380d2f7ec 100644
--- a/gm/rebaseline_server/imagepair.py
+++ b/gm/rebaseline_server/imagepair.py
@@ -32,17 +32,19 @@ class ImagePair(object):
"""
def __init__(self, image_diff_db,
- base_url, imageA_relative_url, imageB_relative_url,
+ imageA_base_url, imageB_base_url,
+ imageA_relative_url, imageB_relative_url,
expectations=None, extra_columns=None, source_json_file=None,
download_all_images=False):
"""
Args:
image_diff_db: ImageDiffDB instance we use to generate/store image diffs
- base_url: base of all image URLs
+ imageA_base_url: string; base URL for image A
+ imageB_base_url: string; base URL for image B
imageA_relative_url: string; URL pointing at an image, relative to
- base_url; or None, if this image is missing
+ imageA_base_url; or None, if this image is missing
imageB_relative_url: string; URL pointing at an image, relative to
- base_url; or None, if this image is missing
+ imageB_base_url; or None, if this image is missing
expectations: optional dictionary containing expectations-specific
metadata (ignore-failure, bug numbers, etc.)
extra_columns: optional dictionary containing more metadata (test name,
@@ -55,7 +57,8 @@ class ImagePair(object):
(imageA == imageB, or one of them is missing)
"""
self._image_diff_db = image_diff_db
- self.base_url = base_url
+ self.imageA_base_url = imageA_base_url
+ self.imageB_base_url = imageB_base_url
self.imageA_relative_url = imageA_relative_url
self.imageB_relative_url = imageB_relative_url
self.expectations_dict = expectations
@@ -76,9 +79,11 @@ class ImagePair(object):
if self._diff_record != None or download_all_images:
image_diff_db.add_image_pair(
expected_image_locator=imageA_relative_url,
- expected_image_url=self.posixpath_join(base_url, imageA_relative_url),
+ expected_image_url=self.posixpath_join(imageA_base_url,
+ imageA_relative_url),
actual_image_locator=imageB_relative_url,
- actual_image_url=self.posixpath_join(base_url, imageB_relative_url))
+ actual_image_url=self.posixpath_join(imageB_base_url,
+ imageB_relative_url))
def as_dict(self):
"""Returns a dictionary describing this ImagePair.
« no previous file with comments | « gm/rebaseline_server/compare_to_expectations.py ('k') | gm/rebaseline_server/imagepair_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698