Chromium Code Reviews| 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 27 matching lines...) Expand all Loading... | |
| 38 | 38 |
| 39 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): | 39 class IOSurface2DCanvasSharedPageState(gpu_test_base.GpuSharedPageState): |
| 40 def __init__(self, test, finder_options, story_set): | 40 def __init__(self, test, finder_options, story_set): |
| 41 super(IOSurface2DCanvasSharedPageState, self).__init__( | 41 super(IOSurface2DCanvasSharedPageState, self).__init__( |
| 42 test, finder_options, story_set) | 42 test, finder_options, story_set) |
| 43 finder_options.browser_options.AppendExtraBrowserArgs( | 43 finder_options.browser_options.AppendExtraBrowserArgs( |
| 44 ['--enable-accelerated-2d-canvas', | 44 ['--enable-accelerated-2d-canvas', |
| 45 '--disable-display-list-2d-canvas']) | 45 '--disable-display-list-2d-canvas']) |
| 46 | 46 |
| 47 | 47 |
| 48 class WebGLNonChromiumImageSharedPageState(gpu_test_base.GpuSharedPageState): | |
| 49 def __init__(self, test, finder_options, story_set): | |
| 50 super(WebGLNonChromiumImageSharedPageState, self).__init__( | |
| 51 test, finder_options, story_set) | |
| 52 finder_options.browser_options.AppendExtraBrowserArgs( | |
| 53 ['--disable-webgl-image-chromium']) | |
| 54 | |
| 55 | |
| 48 class PixelTestsStorySet(story_set_module.StorySet): | 56 class PixelTestsStorySet(story_set_module.StorySet): |
| 49 | 57 |
| 50 """ Some basic test cases for GPU. """ | 58 """ Some basic test cases for GPU. """ |
| 51 def __init__(self, expectations, base_name='Pixel', try_es3=False): | 59 def __init__(self, expectations, base_name='Pixel', try_es3=False): |
| 52 super(PixelTestsStorySet, self).__init__() | 60 super(PixelTestsStorySet, self).__init__() |
| 53 self._AddAllPages(expectations, base_name, False) | 61 self._AddAllPages(expectations, base_name, False) |
| 54 # Would be better to fetch this from Telemetry. | 62 # Would be better to fetch this from Telemetry. |
| 55 # TODO(kbr): enable this on all platforms. Don't know what will | 63 # TODO(kbr): enable this on all platforms. Don't know what will |
| 56 # happen on Android right now. | 64 # happen on Android right now. |
| 57 if try_es3 and sys.platform.startswith('darwin'): | 65 if try_es3 and sys.platform.startswith('darwin'): |
| 58 # Add all the tests again, this time with the | 66 # Add all the tests again, this time with the |
| 59 # --enable-unsafe-es3-apis command line argument. This has the | 67 # --enable-unsafe-es3-apis command line argument. This has the |
| 60 # side-effect of enabling the Core Profile rendering path on Mac | 68 # side-effect of enabling the Core Profile rendering path on Mac |
| 61 # OS. | 69 # OS. |
| 62 self._AddAllPages(expectations, base_name, True) | 70 self._AddAllPages(expectations, base_name, True) |
| 63 | 71 |
| 64 # On OS X, test the IOSurface 2D Canvas compositing path. | |
| 65 if sys.platform.startswith('darwin'): | 72 if sys.platform.startswith('darwin'): |
| 73 # On OS X, test the IOSurface 2D Canvas compositing path. | |
| 66 self.AddStory(PixelTestsPage( | 74 self.AddStory(PixelTestsPage( |
| 67 url='file://../../data/gpu/pixel_canvas2d_accelerated.html', | 75 url='file://../../data/gpu/pixel_canvas2d_accelerated.html', |
| 68 name=base_name + '.IOSurface2DCanvas', | 76 name=base_name + '.IOSurface2DCanvas', |
| 69 test_rect=[0, 0, 400, 400], | 77 test_rect=[0, 0, 400, 400], |
| 70 revision=1, | 78 revision=1, |
| 71 story_set=self, | 79 story_set=self, |
| 72 shared_page_state_class=IOSurface2DCanvasSharedPageState, | 80 shared_page_state_class=IOSurface2DCanvasSharedPageState, |
| 73 expectations=expectations)) | 81 expectations=expectations)) |
| 74 self.AddStory(PixelTestsPage( | 82 self.AddStory(PixelTestsPage( |
| 75 url='file://../../data/gpu/pixel_canvas2d_webgl.html', | 83 url='file://../../data/gpu/pixel_canvas2d_webgl.html', |
| 76 name=base_name + '.IOSurface2DCanvasWebGL', | 84 name=base_name + '.IOSurface2DCanvasWebGL', |
| 77 test_rect=[0, 0, 300, 300], | 85 test_rect=[0, 0, 300, 300], |
| 78 revision=2, | 86 revision=2, |
| 79 story_set=self, | 87 story_set=self, |
| 80 shared_page_state_class=IOSurface2DCanvasSharedPageState, | 88 shared_page_state_class=IOSurface2DCanvasSharedPageState, |
| 81 expectations=expectations)) | 89 expectations=expectations)) |
| 82 | 90 |
| 91 # On OS X, test WebGL non-Chromium Image compositing path. | |
| 92 self.AddStory(PixelTestsPage( | |
| 93 url='file://../../data/gpu/pixel_webgl_aa_alpha.html', | |
| 94 name=base_name + '.WebGLGreenTriangle.NonChromiumImage.AA.Alpha', | |
| 95 test_rect=[0, 0, 300, 300], | |
| 96 revision=1, | |
| 97 story_set=self, | |
| 98 shared_page_state_class=WebGLNonChromiumImageSharedPageState, | |
| 99 expectations=expectations)) | |
| 100 | |
| 101 self.AddStory(PixelTestsPage( | |
| 102 url='file://../../data/gpu/pixel_webgl_noaa_alpha.html', | |
| 103 name=base_name + '.WebGLGreenTriangle.NonChromiumImage.NoAA.Alpha', | |
| 104 test_rect=[0, 0, 300, 300], | |
| 105 revision=1, | |
| 106 story_set=self, | |
| 107 shared_page_state_class=WebGLNonChromiumImageSharedPageState, | |
| 108 expectations=expectations)) | |
| 109 | |
| 110 self.AddStory(PixelTestsPage( | |
| 111 url='file://../../data/gpu/pixel_webgl_aa_noalpha.html', | |
| 112 name=base_name + '.WebGLGreenTriangle.NonChromiumImage.AA.NoAlpha', | |
| 113 test_rect=[0, 0, 300, 300], | |
| 114 revision=1, | |
| 115 story_set=self, | |
| 116 shared_page_state_class=WebGLNonChromiumImageSharedPageState, | |
| 117 expectations=expectations)) | |
| 118 | |
| 119 self.AddStory(PixelTestsPage( | |
| 120 url='file://../../data/gpu/pixel_webgl_noaa_noalpha.html', | |
| 121 name=base_name + '.WebGLGreenTriangle.NonChromiumImage.NoAA.NoAlpha', | |
| 122 test_rect=[0, 0, 300, 300], | |
| 123 revision=1, | |
| 124 story_set=self, | |
| 125 shared_page_state_class=WebGLNonChromiumImageSharedPageState, | |
| 126 expectations=expectations)) | |
| 127 | |
| 83 def _AddAllPages(self, expectations, base_name, use_es3): | 128 def _AddAllPages(self, expectations, base_name, use_es3): |
| 84 if use_es3: | 129 if use_es3: |
| 85 es3_suffix = 'ES3' | 130 es3_suffix = 'ES3' |
| 86 shared_page_state_class = PixelTestsES3SharedPageState | 131 shared_page_state_class = PixelTestsES3SharedPageState |
| 87 else: | 132 else: |
| 88 es3_suffix = '' | 133 es3_suffix = '' |
| 89 shared_page_state_class = gpu_test_base.GpuSharedPageState | 134 shared_page_state_class = gpu_test_base.GpuSharedPageState |
| 90 | 135 |
| 91 self.AddStory(PixelTestsPage( | 136 self.AddStory(PixelTestsPage( |
| 92 url='file://../../data/gpu/pixel_canvas2d.html', | 137 url='file://../../data/gpu/pixel_canvas2d.html', |
| 93 name=base_name + '.Canvas2DRedBox' + es3_suffix, | 138 name=base_name + '.Canvas2DRedBox' + es3_suffix, |
| 94 test_rect=[0, 0, 300, 300], | 139 test_rect=[0, 0, 300, 300], |
| 95 revision=7, | 140 revision=7, |
| 96 story_set=self, | 141 story_set=self, |
| 97 shared_page_state_class=shared_page_state_class, | 142 shared_page_state_class=shared_page_state_class, |
| 98 expectations=expectations)) | 143 expectations=expectations)) |
| 99 | 144 |
| 100 self.AddStory(PixelTestsPage( | 145 self.AddStory(PixelTestsPage( |
| 101 url='file://../../data/gpu/pixel_css3d.html', | 146 url='file://../../data/gpu/pixel_css3d.html', |
| 102 name=base_name + '.CSS3DBlueBox' + es3_suffix, | 147 name=base_name + '.CSS3DBlueBox' + es3_suffix, |
| 103 test_rect=[0, 0, 300, 300], | 148 test_rect=[0, 0, 300, 300], |
| 104 revision=15, | 149 revision=15, |
| 105 story_set=self, | 150 story_set=self, |
| 106 shared_page_state_class=shared_page_state_class, | 151 shared_page_state_class=shared_page_state_class, |
| 107 expectations=expectations)) | 152 expectations=expectations)) |
| 108 | 153 |
| 109 self.AddStory(PixelTestsPage( | 154 self.AddStory(PixelTestsPage( |
| 110 url='file://../../data/gpu/pixel_webgl.html', | 155 url='file://../../data/gpu/pixel_webgl_aa_alpha.html', |
| 111 name=base_name + '.WebGLGreenTriangle' + es3_suffix, | 156 name=base_name + '.WebGLGreenTriangle.AA.Alpha' + es3_suffix, |
| 112 test_rect=[0, 0, 300, 300], | 157 test_rect=[0, 0, 300, 300], |
| 113 revision=12, | 158 revision=1, |
| 114 story_set=self, | 159 story_set=self, |
| 115 shared_page_state_class=shared_page_state_class, | 160 shared_page_state_class=shared_page_state_class, |
| 116 expectations=expectations)) | 161 expectations=expectations)) |
| 162 | |
| 163 self.AddStory(PixelTestsPage( | |
| 164 url='file://../../data/gpu/pixel_webgl_noaa_alpha.html', | |
| 165 name=base_name + '.WebGLGreenTriangle.NoAA.Alpha' + es3_suffix, | |
|
Ken Russell (switch to Gerrit)
2016/06/01 02:06:07
I think you'll need to suppress failures of these
erikchen
2016/06/01 17:07:03
Done.
| |
| 166 test_rect=[0, 0, 300, 300], | |
| 167 revision=1, | |
| 168 story_set=self, | |
| 169 shared_page_state_class=shared_page_state_class, | |
| 170 expectations=expectations)) | |
| 171 | |
| 172 self.AddStory(PixelTestsPage( | |
| 173 url='file://../../data/gpu/pixel_webgl_aa_noalpha.html', | |
| 174 name=base_name + '.WebGLGreenTriangle.AA.NoAlpha' + es3_suffix, | |
| 175 test_rect=[0, 0, 300, 300], | |
| 176 revision=1, | |
| 177 story_set=self, | |
| 178 shared_page_state_class=shared_page_state_class, | |
| 179 expectations=expectations)) | |
| 180 | |
| 181 self.AddStory(PixelTestsPage( | |
| 182 url='file://../../data/gpu/pixel_webgl_noaa_noalpha.html', | |
| 183 name=base_name + '.WebGLGreenTriangle.NoAA.NoAlpha' + es3_suffix, | |
| 184 test_rect=[0, 0, 300, 300], | |
| 185 revision=1, | |
| 186 story_set=self, | |
| 187 shared_page_state_class=shared_page_state_class, | |
| 188 expectations=expectations)) | |
| 117 | 189 |
| 118 self.AddStory(PixelTestsPage( | 190 self.AddStory(PixelTestsPage( |
| 119 url='file://../../data/gpu/pixel_scissor.html', | 191 url='file://../../data/gpu/pixel_scissor.html', |
| 120 name=base_name + '.ScissorTestWithPreserveDrawingBuffer' + es3_suffix, | 192 name=base_name + '.ScissorTestWithPreserveDrawingBuffer' + es3_suffix, |
| 121 test_rect=[0, 0, 300, 300], | 193 test_rect=[0, 0, 300, 300], |
| 122 revision=0, # This is not used. | 194 revision=0, # This is not used. |
| 123 story_set=self, | 195 story_set=self, |
| 124 shared_page_state_class=shared_page_state_class, | 196 shared_page_state_class=shared_page_state_class, |
| 125 expectations=expectations, | 197 expectations=expectations, |
| 126 expected_colors='../../data/gpu/pixel_scissor_expectations.json')) | 198 expected_colors='../../data/gpu/pixel_scissor_expectations.json')) |
| 127 | 199 |
| 128 self.AddStory(PixelTestsPage( | 200 self.AddStory(PixelTestsPage( |
| 129 url='file://../../data/gpu/pixel_canvas2d_webgl.html', | 201 url='file://../../data/gpu/pixel_canvas2d_webgl.html', |
| 130 name=base_name + '.2DCanvasWebGL', | 202 name=base_name + '.2DCanvasWebGL', |
| 131 test_rect=[0, 0, 300, 300], | 203 test_rect=[0, 0, 300, 300], |
| 132 revision=2, | 204 revision=2, |
| 133 story_set=self, | 205 story_set=self, |
| 134 shared_page_state_class=shared_page_state_class, | 206 shared_page_state_class=shared_page_state_class, |
| 135 expectations=expectations)) | 207 expectations=expectations)) |
| 136 | 208 |
| 137 @property | 209 @property |
| 138 def allow_mixed_story_states(self): | 210 def allow_mixed_story_states(self): |
| 139 # Return True here in order to be able to add the same tests with | 211 # Return True here in order to be able to add the same tests with |
| 140 # a different SharedPageState on Mac which tests them with the | 212 # a different SharedPageState on Mac which tests them with the |
| 141 # Core Profile rendering path. | 213 # Core Profile rendering path. |
| 142 return True | 214 return True |
| OLD | NEW |