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

Unified Diff: compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py

Issue 183763025: vm_run_skia_try/write_json_summary: run skpdiff within imagediffdb, not on its own (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Created 6 years, 10 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: compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py
diff --git a/compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py b/compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py
index a7d09f37b307af49c15ff3f0a25f64873f1b907f..019d12afc1ce655f54beaa12c2ef317c15091ae1 100644
--- a/compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py
+++ b/compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/imagediffdb_mock.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
+#!/usr/bin/env python
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Dummy module that pretends to be imagediffdb.py for write_json_summary_test.
@@ -12,9 +12,10 @@ https://code.google.com/p/skia/source/browse/trunk/gm/rebaseline_server/imagedif
class DiffRecord(object):
- def __init__(self, storage_root, expected_image_url, expected_image_locator,
- actual_image_url, actual_image_locator, expected_images_subdir,
- actual_images_subdir):
+ def __init__(self, storage_root=None, expected_image_url=None,
+ expected_image_locator=None, actual_image_url=None,
+ actual_image_locator=None, expected_images_subdir=None,
+ actual_images_subdir=None):
pass
def get_num_pixels_differing(self):
@@ -29,3 +30,19 @@ class DiffRecord(object):
def get_max_diff_per_channel(self):
return 4
+ def get_perceptual_difference(self):
+ return 5
+
+
+class ImageDiffDB(object):
+
+ def __init__(self, storage_root):
+ pass
+
+ def add_image_pair(self,
+ expected_image_url, expected_image_locator,
rmistry 2014/03/04 13:14:19 Nit: Combine line 43 into line 42.
epoger 2014/03/04 14:44:42 Done.
+ actual_image_url, actual_image_locator):
+ pass
+
+ def get_diff_record(self, expected_image_locator, actual_image_locator):
+ return DiffRecord()

Powered by Google App Engine
This is Rietveld 408576698