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

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

Issue 2077443002: Switch webgl2_conformance_tests to new harness, and shard them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-fetch current tab after browser restart. Created 4 years, 6 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 4
5 import logging 5 import logging
6 6
7 from telemetry.testing import serially_executed_browser_test_case 7 from telemetry.testing import serially_executed_browser_test_case
8 8
9 from gpu_tests import exception_formatter 9 from gpu_tests import exception_formatter
10 from gpu_tests import gpu_test_expectations 10 from gpu_tests import gpu_test_expectations
(...skipping 15 matching lines...) Expand all
26 26
27 @classmethod 27 @classmethod
28 def GenerateTestCases__RunGpuTest(cls, options): 28 def GenerateTestCases__RunGpuTest(cls, options):
29 for test_name, url, args in cls.GenerateGpuTests(options): 29 for test_name, url, args in cls.GenerateGpuTests(options):
30 yield test_name, (url, test_name, args) 30 yield test_name, (url, test_name, args)
31 31
32 def _RestartBrowser(self, reason): 32 def _RestartBrowser(self, reason):
33 logging.warning('Restarting browser due to ' + reason) 33 logging.warning('Restarting browser due to ' + reason)
34 self.StopBrowser() 34 self.StopBrowser()
35 self.StartBrowser(self._finder_options) 35 self.StartBrowser(self._finder_options)
36 self.tab = self.browser.tabs[0]
36 37
37 def _RunGpuTest(self, url, test_name, args): 38 def _RunGpuTest(self, url, test_name, args):
38 temp_page = _EmulatedPage(url, test_name) 39 temp_page = _EmulatedPage(url, test_name)
39 expectations = self.__class__.GetExpectations() 40 expectations = self.__class__.GetExpectations()
40 expectation = expectations.GetExpectationForPage( 41 expectation = expectations.GetExpectationForPage(
41 self.browser, temp_page) 42 self.browser, temp_page)
42 if expectation == 'skip': 43 if expectation == 'skip':
43 # skipTest in Python's unittest harness raises an exception, so 44 # skipTest in Python's unittest harness raises an exception, so
44 # aborts the control flow here. 45 # aborts the control flow here.
45 self.skipTest('SKIPPING TEST due to test expectations') 46 self.skipTest('SKIPPING TEST due to test expectations')
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 @classmethod 119 @classmethod
119 def _CreateExpectations(cls): 120 def _CreateExpectations(cls):
120 # Subclasses **must** override this in order to provide their test 121 # Subclasses **must** override this in order to provide their test
121 # expectations to the harness. 122 # expectations to the harness.
122 # 123 #
123 # Do not call this directly. Call GetExpectations where necessary. 124 # Do not call this directly. Call GetExpectations where necessary.
124 raise NotImplementedError 125 raise NotImplementedError
125 126
126 def setUp(self): 127 def setUp(self):
127 self.tab = self.browser.tabs[0] 128 self.tab = self.browser.tabs[0]
OLDNEW
« no previous file with comments | « content/test/gpu/generate_buildbot_json.py ('k') | content/test/gpu/gpu_tests/webgl2_conformance_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698