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

Side by Side Diff: content/test/gpu/gpu_tests/screenshot_sync_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 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 import logging 5 import logging
6 import os 6 import os
7 import random 7 import random
8 import sys
8 9
9 from gpu_tests import gpu_integration_test 10 from gpu_tests import gpu_integration_test
10 from gpu_tests import path_util 11 from gpu_tests import path_util
11 from gpu_tests import screenshot_sync_expectations 12 from gpu_tests import screenshot_sync_expectations
12 13
13 from telemetry.util import image_util 14 from telemetry.util import image_util
14 from telemetry.util import rgba_color 15 from telemetry.util import rgba_color
15 16
16 data_path = os.path.join( 17 data_path = os.path.join(
17 path_util.GetChromiumSrcDir(), 'content', 'test', 'data', 'gpu') 18 path_util.GetChromiumSrcDir(), 'content', 'test', 'data', 'gpu')
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 for x in range(start_x, outer_size, skip): 126 for x in range(start_x, outer_size, skip):
126 self._CheckColorMatchAtLocation(canvasRGB, screenshot, x, y) 127 self._CheckColorMatchAtLocation(canvasRGB, screenshot, x, y)
127 128
128 def RunActualGpuTest(self, test_path, *args): 129 def RunActualGpuTest(self, test_path, *args):
129 browser_arg = args[0] 130 browser_arg = args[0]
130 self.RestartBrowserIfNecessaryWithArgs([browser_arg]) 131 self.RestartBrowserIfNecessaryWithArgs([browser_arg])
131 self._Navigate(test_path) 132 self._Navigate(test_path)
132 repetitions = 20 133 repetitions = 20
133 for _ in range(0, repetitions): 134 for _ in range(0, repetitions):
134 self._CheckScreenshot() 135 self._CheckScreenshot()
136
137 def load_tests(loader, tests, pattern):
138 del loader, tests, pattern # Unused.
139 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__])
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_integration_test.py ('k') | content/test/gpu/gpu_tests/trace_integration_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698