| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from gpu_tests import test_expectations | 5 from gpu_tests import test_expectations |
| 6 | 6 |
| 7 ANGLE_CONDITIONS = ['d3d9', 'd3d11', 'opengl', 'no_angle'] | 7 ANGLE_CONDITIONS = ['d3d9', 'd3d11', 'opengl', 'no_angle'] |
| 8 | 8 |
| 9 GPU_CONDITIONS = ['amd', 'arm', 'broadcom', 'hisilicon', 'intel', 'imagination', | 9 GPU_CONDITIONS = ['amd', 'arm', 'broadcom', 'hisilicon', 'intel', 'imagination', |
| 10 'nvidia', 'qualcomm', 'vivante'] | 10 'nvidia', 'qualcomm', 'vivante'] |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 if cl in GPU_CONDITIONS: | 51 if cl in GPU_CONDITIONS: |
| 52 self.gpu_conditions.append(cl) | 52 self.gpu_conditions.append(cl) |
| 53 elif cl in ANGLE_CONDITIONS: | 53 elif cl in ANGLE_CONDITIONS: |
| 54 self.angle_conditions.append(cl) | 54 self.angle_conditions.append(cl) |
| 55 else: | 55 else: |
| 56 # Delegate to superclass. | 56 # Delegate to superclass. |
| 57 super(GpuExpectation, self).ParseCondition(condition) | 57 super(GpuExpectation, self).ParseCondition(condition) |
| 58 | 58 |
| 59 | 59 |
| 60 class GpuTestExpectations(test_expectations.TestExpectations): | 60 class GpuTestExpectations(test_expectations.TestExpectations): |
| 61 def __init__(self, url_prefixes=None): | |
| 62 super(GpuTestExpectations, self).__init__(url_prefixes=url_prefixes) | |
| 63 | |
| 64 def CreateExpectation(self, expectation, pattern, conditions=None, | 61 def CreateExpectation(self, expectation, pattern, conditions=None, |
| 65 bug=None): | 62 bug=None): |
| 66 return GpuExpectation(expectation, pattern, conditions, bug) | 63 return GpuExpectation(expectation, pattern, conditions, bug) |
| 67 | 64 |
| 68 def Flaky(self, pattern, conditions=None, bug=None, max_num_retries=2): | 65 def Flaky(self, pattern, conditions=None, bug=None, max_num_retries=2): |
| 69 self._AddExpectation(GpuExpectation( | 66 self._AddExpectation(GpuExpectation( |
| 70 'flaky', pattern, conditions=conditions, bug=bug, | 67 'flaky', pattern, conditions=conditions, bug=bug, |
| 71 max_num_retries=max_num_retries)) | 68 max_num_retries=max_num_retries)) |
| 72 | 69 |
| 73 def GetFlakyRetriesForPage(self, browser, page): | 70 def GetFlakyRetriesForPage(self, browser, page): |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if gpu_info and gpu_info.aux_attributes: | 124 if gpu_info and gpu_info.aux_attributes: |
| 128 gl_renderer = gpu_info.aux_attributes.get('gl_renderer') | 125 gl_renderer = gpu_info.aux_attributes.get('gl_renderer') |
| 129 if gl_renderer and 'ANGLE' in gl_renderer: | 126 if gl_renderer and 'ANGLE' in gl_renderer: |
| 130 if 'Direct3D11' in gl_renderer: | 127 if 'Direct3D11' in gl_renderer: |
| 131 return 'd3d11' | 128 return 'd3d11' |
| 132 elif 'Direct3D9' in gl_renderer: | 129 elif 'Direct3D9' in gl_renderer: |
| 133 return 'd3d9' | 130 return 'd3d9' |
| 134 elif 'OpenGL' in gl_renderer: | 131 elif 'OpenGL' in gl_renderer: |
| 135 return 'opengl' | 132 return 'opengl' |
| 136 return 'no_angle' | 133 return 'no_angle' |
| OLD | NEW |