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

Side by Side Diff: content/test/gpu/gpu_tests/cloud_storage_test_base.py

Issue 411143003: Add an "in_unit_test_mode" attribute to the environment. Use this to default output format to 'gtes… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comment. Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base classes for a test and validator which upload results 5 """Base classes for a test and validator which upload results
6 (reference images, error images) to cloud storage.""" 6 (reference images, error images) to cloud storage."""
7 7
8 import os 8 import os
9 import re 9 import re
10 import tempfile 10 import tempfile
(...skipping 29 matching lines...) Expand all
40 expectation["color"][2]) 40 expectation["color"][2])
41 if not actual_color.IsEqual(expected_color, expectation["tolerance"]): 41 if not actual_color.IsEqual(expected_color, expectation["tolerance"]):
42 raise page_test.Failure('Expected pixel at ' + str(location) + 42 raise page_test.Failure('Expected pixel at ' + str(location) +
43 ' to be ' + 43 ' to be ' +
44 str(expectation["color"]) + " but got [" + 44 str(expectation["color"]) + " but got [" +
45 str(actual_color.r) + ", " + 45 str(actual_color.r) + ", " +
46 str(actual_color.g) + ", " + 46 str(actual_color.g) + ", " +
47 str(actual_color.b) + "]") 47 str(actual_color.b) + "]")
48 48
49 class ValidatorBase(page_test.PageTest): 49 class ValidatorBase(page_test.PageTest):
50 options = {'output_format': 'gtest'}
Ken Russell (switch to Gerrit) 2014/07/24 01:24:33 Where is it documented that a class variable named
51
50 def __init__(self): 52 def __init__(self):
51 super(ValidatorBase, self).__init__() 53 super(ValidatorBase, self).__init__()
52 # Parameters for cloud storage reference images. 54 # Parameters for cloud storage reference images.
53 self.vendor_id = None 55 self.vendor_id = None
54 self.device_id = None 56 self.device_id = None
55 self.vendor_string = None 57 self.vendor_string = None
56 self.device_string = None 58 self.device_string = None
57 self.msaa = False 59 self.msaa = False
58 60
59 ### 61 ###
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 default='') 246 default='')
245 group.add_option('--test-machine-name', 247 group.add_option('--test-machine-name',
246 help='Name of the test machine. Specifying this argument causes this ' 248 help='Name of the test machine. Specifying this argument causes this '
247 'script to upload failure images and diffs to cloud storage directly, ' 249 'script to upload failure images and diffs to cloud storage directly, '
248 'instead of relying on the archive_gpu_pixel_test_results.py script.', 250 'instead of relying on the archive_gpu_pixel_test_results.py script.',
249 default='') 251 default='')
250 group.add_option('--generated-dir', 252 group.add_option('--generated-dir',
251 help='Overrides the default on-disk location for generated test images ' 253 help='Overrides the default on-disk location for generated test images '
252 '(only used for local testing without a cloud storage account)', 254 '(only used for local testing without a cloud storage account)',
253 default=default_generated_data_dir) 255 default=default_generated_data_dir)
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698