OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Dummy module that pretends to be imagediffdb.py for write_json_summary_test. | 6 """Dummy module that pretends to be imagediffdb.py for write_json_summary_test. |
7 | 7 |
8 imagediffdb.py here refers to | 8 imagediffdb.py here refers to |
9 https://code.google.com/p/skia/source/browse/trunk/gm/rebaseline_server/imagedif
fdb.py | 9 https://code.google.com/p/skia/source/browse/trunk/gm/rebaseline_server/imagedif
fdb.py |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 actual_image_locator=None, expected_images_subdir=None, | 21 actual_image_locator=None, expected_images_subdir=None, |
22 actual_images_subdir=None): | 22 actual_images_subdir=None): |
23 pass | 23 pass |
24 | 24 |
25 def get_num_pixels_differing(self): | 25 def get_num_pixels_differing(self): |
26 return 1 | 26 return 1 |
27 | 27 |
28 def get_percent_pixels_differing(self): | 28 def get_percent_pixels_differing(self): |
29 return 2 | 29 return 2 |
30 | 30 |
31 def get_weighted_diff_measure(self): | |
32 return 3 | |
33 | |
34 def get_max_diff_per_channel(self): | 31 def get_max_diff_per_channel(self): |
35 return 4 | 32 return 4 |
36 | 33 |
37 def get_perceptual_difference(self): | 34 def get_perceptual_difference(self): |
38 return 5 | 35 return 5 |
39 | 36 |
40 | 37 |
41 class ImageDiffDB(object): | 38 class ImageDiffDB(object): |
42 | 39 |
43 def __init__(self, storage_root): | 40 def __init__(self, storage_root): |
44 pass | 41 pass |
45 | 42 |
46 def add_image_pair(self, expected_image_url, expected_image_locator, | 43 def add_image_pair(self, expected_image_url, expected_image_locator, |
47 actual_image_url, actual_image_locator): | 44 actual_image_url, actual_image_locator): |
48 pass | 45 pass |
49 | 46 |
50 def get_diff_record(self, expected_image_locator, actual_image_locator): | 47 def get_diff_record(self, expected_image_locator, actual_image_locator): |
51 return DiffRecord() | 48 return DiffRecord() |
OLD | NEW |