| 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 19 matching lines...) Expand all Loading... |
| 30 super(PixelTestsPage, self).RunNavigateSteps(action_runner) | 30 super(PixelTestsPage, self).RunNavigateSteps(action_runner) |
| 31 action_runner.WaitForJavaScriptCondition( | 31 action_runner.WaitForJavaScriptCondition( |
| 32 'domAutomationController._finished', timeout_in_seconds=30) | 32 'domAutomationController._finished', timeout_in_seconds=30) |
| 33 | 33 |
| 34 | 34 |
| 35 class PixelTestsES3SharedPageState(gpu_test_base.GpuSharedPageState): | 35 class PixelTestsES3SharedPageState(gpu_test_base.GpuSharedPageState): |
| 36 def __init__(self, test, finder_options, story_set): | 36 def __init__(self, test, finder_options, story_set): |
| 37 super(PixelTestsES3SharedPageState, self).__init__( | 37 super(PixelTestsES3SharedPageState, self).__init__( |
| 38 test, finder_options, story_set) | 38 test, finder_options, story_set) |
| 39 finder_options.browser_options.AppendExtraBrowserArgs( | 39 finder_options.browser_options.AppendExtraBrowserArgs( |
| 40 ['--enable-unsafe-es3-apis']) | 40 ['--enable-es3-apis']) |
| 41 | 41 |
| 42 | 42 |
| 43 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): | 43 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): |
| 44 def __init__(self, test, finder_options, story_set): | 44 def __init__(self, test, finder_options, story_set): |
| 45 super(IOSurface2DCanvasSharedPageState, self).__init__( | 45 super(IOSurface2DCanvasSharedPageState, self).__init__( |
| 46 test, finder_options, story_set) | 46 test, finder_options, story_set) |
| 47 finder_options.browser_options.AppendExtraBrowserArgs( | 47 finder_options.browser_options.AppendExtraBrowserArgs( |
| 48 ['--enable-accelerated-2d-canvas', | 48 ['--enable-accelerated-2d-canvas', |
| 49 '--disable-display-list-2d-canvas']) | 49 '--disable-display-list-2d-canvas']) |
| 50 | 50 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 story_set=self, | 134 story_set=self, |
| 135 shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, | 135 shared_page_state_class=EnableExperimentalCanvasFeaturesSharedPageState, |
| 136 expectations=expectations)) | 136 expectations=expectations)) |
| 137 | 137 |
| 138 | 138 |
| 139 # Would be better to fetch this from Telemetry. | 139 # Would be better to fetch this from Telemetry. |
| 140 # TODO(kbr): enable this on all platforms. Don't know what will | 140 # TODO(kbr): enable this on all platforms. Don't know what will |
| 141 # happen on Android right now. | 141 # happen on Android right now. |
| 142 if try_es3 and sys.platform.startswith('darwin'): | 142 if try_es3 and sys.platform.startswith('darwin'): |
| 143 # Add all the tests again, this time with the | 143 # Add all the tests again, this time with the |
| 144 # --enable-unsafe-es3-apis command line argument. This has the | 144 # --enable-es3-apis command line argument. This has the |
| 145 # side-effect of enabling the Core Profile rendering path on Mac | 145 # side-effect of enabling the Core Profile rendering path on Mac |
| 146 # OS. | 146 # OS. |
| 147 self._AddAllPages(expectations, base_name, True) | 147 self._AddAllPages(expectations, base_name, True) |
| 148 | 148 |
| 149 if sys.platform.startswith('darwin'): | 149 if sys.platform.startswith('darwin'): |
| 150 # On OS X, test the IOSurface 2D Canvas compositing path. | 150 # On OS X, test the IOSurface 2D Canvas compositing path. |
| 151 self.AddStory(PixelTestsPage( | 151 self.AddStory(PixelTestsPage( |
| 152 url='file://../../data/gpu/pixel_canvas2d_accelerated.html', | 152 url='file://../../data/gpu/pixel_canvas2d_accelerated.html', |
| 153 name=base_name + '.IOSurface2DCanvas', | 153 name=base_name + '.IOSurface2DCanvas', |
| 154 test_rect=[0, 0, 400, 400], | 154 test_rect=[0, 0, 400, 400], |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 story_set=self, | 312 story_set=self, |
| 313 shared_page_state_class=shared_page_state_class, | 313 shared_page_state_class=shared_page_state_class, |
| 314 expectations=expectations)) | 314 expectations=expectations)) |
| 315 | 315 |
| 316 @property | 316 @property |
| 317 def allow_mixed_story_states(self): | 317 def allow_mixed_story_states(self): |
| 318 # Return True here in order to be able to add the same tests with | 318 # Return True here in order to be able to add the same tests with |
| 319 # a different SharedPageState on Mac which tests them with the | 319 # a different SharedPageState on Mac which tests them with the |
| 320 # Core Profile rendering path. | 320 # Core Profile rendering path. |
| 321 return True | 321 return True |
| OLD | NEW |