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

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: ravi's comments 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
« no previous file with comments | « no previous file | compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/output.csv » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cc614af795346cdef5313a5d16e06e1ea94a222b 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,20 +1,25 @@
-#!/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.
imagediffdb.py here refers to
https://code.google.com/p/skia/source/browse/trunk/gm/rebaseline_server/imagediffdb.py
+
+TODO(rmistry): As noted in https://codereview.chromium.org/183763025 ,
+it would be good for us to add lots of assertions about how this mock gets
+called during unittests.
"""
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 +34,18 @@ 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,
+ actual_image_url, actual_image_locator):
+ pass
+
+ def get_diff_record(self, expected_image_locator, actual_image_locator):
+ return DiffRecord()
« no previous file with comments | « no previous file | compute_engine_scripts/telemetry/telemetry_slave_scripts/test_data/output.csv » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698