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
This commit is contained in:
stephana 2014-08-13 19:12:57 -07:00 committed by Commit bot
parent 81ecaa2e4c
commit e8d74d988a
2 changed files with 12 additions and 4 deletions

View File

@ -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";
};

View File

@ -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";
};