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 telemetry.story import story_set as story_set_module | 5 from telemetry.story import story_set as story_set_module |
6 | 6 |
7 import sys | 7 import sys |
8 | 8 |
9 from gpu_tests import gpu_test_base | 9 from gpu_tests import gpu_test_base |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 | 59 |
60 class DisableMacOverlaysSharedPageState(gpu_test_base.GpuSharedPageState): | 60 class DisableMacOverlaysSharedPageState(gpu_test_base.GpuSharedPageState): |
61 def __init__(self, test, finder_options, story_set): | 61 def __init__(self, test, finder_options, story_set): |
62 super(DisableMacOverlaysSharedPageState, self).__init__( | 62 super(DisableMacOverlaysSharedPageState, self).__init__( |
63 test, finder_options, story_set) | 63 test, finder_options, story_set) |
64 finder_options.browser_options.AppendExtraBrowserArgs( | 64 finder_options.browser_options.AppendExtraBrowserArgs( |
65 ['--disable-mac-overlays']) | 65 ['--disable-mac-overlays']) |
66 | 66 |
67 | 67 |
| 68 class EnableExperimentalCanvasFeaturesSharedPageState( |
| 69 gpu_test_base.GpuSharedPageState): |
| 70 def __init__(self, test, finder_options, story_set): |
| 71 super(EnableExperimentalCanvasFeaturesSharedPageState, self).__init__( |
| 72 test, finder_options, story_set) |
| 73 finder_options.browser_options.AppendExtraBrowserArgs( |
| 74 ['--enable-experimental-canvas-features']) |
| 75 |
68 class PixelTestsStorySet(story_set_module.StorySet): | 76 class PixelTestsStorySet(story_set_module.StorySet): |
69 | 77 |
70 """ Some basic test cases for GPU. """ | 78 """ Some basic test cases for GPU. """ |
71 def __init__(self, expectations, base_name='Pixel', try_es3=False): | 79 def __init__(self, expectations, base_name='Pixel', try_es3=False): |
72 super(PixelTestsStorySet, self).__init__() | 80 super(PixelTestsStorySet, self).__init__() |
73 self._AddAllPages(expectations, base_name, False) | 81 self._AddAllPages(expectations, base_name, False) |
74 # Would be better to fetch this from Telemetry. | 82 # Would be better to fetch this from Telemetry. |
75 # TODO(kbr): enable this on all platforms. Don't know what will | 83 # TODO(kbr): enable this on all platforms. Don't know what will |
76 # happen on Android right now. | 84 # happen on Android right now. |
77 if try_es3 and sys.platform.startswith('darwin'): | 85 if try_es3 and sys.platform.startswith('darwin'): |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 else: | 173 else: |
166 es3_suffix = '' | 174 es3_suffix = '' |
167 shared_page_state_class = gpu_test_base.GpuSharedPageState | 175 shared_page_state_class = gpu_test_base.GpuSharedPageState |
168 | 176 |
169 self.AddStory(PixelTestsPage( | 177 self.AddStory(PixelTestsPage( |
170 url='file://../../data/gpu/pixel_offscreenCanvas_webgl_commit_main.html', | 178 url='file://../../data/gpu/pixel_offscreenCanvas_webgl_commit_main.html', |
171 name=base_name + '.OffscreenCanvasWebGLGreenBox' + es3_suffix, | 179 name=base_name + '.OffscreenCanvasWebGLGreenBox' + es3_suffix, |
172 test_rect=[0, 0, 300, 300], | 180 test_rect=[0, 0, 300, 300], |
173 revision=1, | 181 revision=1, |
174 story_set=self, | 182 story_set=self, |
175 shared_page_state_class=shared_page_state_class, | 183 shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, |
176 expectations=expectations)) | 184 expectations=expectations)) |
177 | 185 |
178 self.AddStory(PixelTestsPage( | 186 self.AddStory(PixelTestsPage( |
179 url='file://../../data/gpu/pixel_canvas2d.html', | 187 url='file://../../data/gpu/pixel_canvas2d.html', |
180 name=base_name + '.Canvas2DRedBox' + es3_suffix, | 188 name=base_name + '.Canvas2DRedBox' + es3_suffix, |
181 test_rect=[0, 0, 300, 300], | 189 test_rect=[0, 0, 300, 300], |
182 revision=7, | 190 revision=7, |
183 story_set=self, | 191 story_set=self, |
184 shared_page_state_class=shared_page_state_class, | 192 shared_page_state_class=shared_page_state_class, |
185 expectations=expectations)) | 193 expectations=expectations)) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 story_set=self, | 264 story_set=self, |
257 shared_page_state_class=shared_page_state_class, | 265 shared_page_state_class=shared_page_state_class, |
258 expectations=expectations)) | 266 expectations=expectations)) |
259 | 267 |
260 @property | 268 @property |
261 def allow_mixed_story_states(self): | 269 def allow_mixed_story_states(self): |
262 # Return True here in order to be able to add the same tests with | 270 # Return True here in order to be able to add the same tests with |
263 # a different SharedPageState on Mac which tests them with the | 271 # a different SharedPageState on Mac which tests them with the |
264 # Core Profile rendering path. | 272 # Core Profile rendering path. |
265 return True | 273 return True |
OLD | NEW |