From e8d74d988a6c0138031d85dd8bd114c9f052f6f7 Mon Sep 17 00:00:00 2001 From: stephana Date: Wed, 13 Aug 2014 19:12:57 -0700 Subject: [PATCH] This is a bit of a hack, but will work. I have a cleaner fix ready (but still need to fix some broken tests). BUG=skia: NOTRY=true R=epoger@google.com Author: stephana@google.com Review URL: https://codereview.chromium.org/472703002 --- gm/rebaseline_server/static/live-loader.js | 8 ++++++-- gm/rebaseline_server/static/loader.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gm/rebaseline_server/static/live-loader.js b/gm/rebaseline_server/static/live-loader.js index cd4560f269..9922c5a574 100644 --- a/gm/rebaseline_server/static/live-loader.js +++ b/gm/rebaseline_server/static/live-loader.js @@ -1052,10 +1052,14 @@ Loader.controller( * * @param imagePair: ImagePair to generate image diff URL for */ + // TODO (stephana): this is a temporary fix. A fix is in the works + // to get rid of this function and include the URL in the data + // sent from the backend. + $scope.getImageDiffRelativeUrl = function(imagePair) { var before = - imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + - imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; + imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "_png-vs-" + + imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL] + "_png"; return before.replace(/[^\w\-]/g, "_") + ".png"; }; diff --git a/gm/rebaseline_server/static/loader.js b/gm/rebaseline_server/static/loader.js index e6030ad439..c3f69ba66f 100644 --- a/gm/rebaseline_server/static/loader.js +++ b/gm/rebaseline_server/static/loader.js @@ -1042,10 +1042,14 @@ Loader.controller( * * @param imagePair: ImagePair to generate image diff URL for */ + // TODO (stephana): this is a temporary fix. A fix is in the works + // to get rid of this function and include the URL in the data + // sent from the backend. + $scope.getImageDiffRelativeUrl = function(imagePair) { var before = - imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + - imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; + imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "_png-vs-" + + imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL] + "_png"; return before.replace(/[^\w\-]/g, "_") + ".png"; };