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

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

Issue 2662863002: Add typ boilerplate to Telemetry-based GPU tests. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 import glob 4 import glob
5 import logging 5 import logging
6 import os 6 import os
7 import re 7 import re
8 import sys 8 import sys
9 9
10 from gpu_tests import gpu_integration_test
10 from gpu_tests import cloud_storage_integration_test_base 11 from gpu_tests import cloud_storage_integration_test_base
11 from gpu_tests import pixel_expectations 12 from gpu_tests import pixel_expectations
12 from gpu_tests import pixel_test_pages 13 from gpu_tests import pixel_test_pages
13 14
14 from py_utils import cloud_storage 15 from py_utils import cloud_storage
15 from telemetry.util import image_util 16 from telemetry.util import image_util
16 17
17 18
18 test_data_dir = os.path.abspath(os.path.join( 19 test_data_dir = os.path.abspath(os.path.join(
19 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) 20 os.path.dirname(__file__), '..', '..', 'data', 'gpu'))
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 ref_png = None 220 ref_png = None
220 221
221 if ref_png is not None: 222 if ref_png is not None:
222 return ref_png 223 return ref_png
223 224
224 print ('Reference image not found. Writing tab contents as reference to: ' + 225 print ('Reference image not found. Writing tab contents as reference to: ' +
225 image_path) 226 image_path)
226 227
227 self._WriteImage(image_path, screenshot) 228 self._WriteImage(image_path, screenshot)
228 return screenshot 229 return screenshot
230
231 def load_tests(loader, tests, pattern):
232 del loader, tests, pattern # Unused.
233 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__])
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/path_util.py ('k') | content/test/gpu/gpu_tests/screenshot_sync_integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698