OLD | NEW |
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 import glob | 4 import glob |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 import re | 7 import re |
8 import sys | 8 import sys |
9 | 9 |
10 from gpu_tests import gpu_integration_test | 10 from gpu_tests import gpu_integration_test |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 @classmethod | 116 @classmethod |
117 def GenerateGpuTests(cls, options): | 117 def GenerateGpuTests(cls, options): |
118 cls.SetParsedCommandLineOptions(options) | 118 cls.SetParsedCommandLineOptions(options) |
119 name = 'Pixel' | 119 name = 'Pixel' |
120 pages = pixel_test_pages.DefaultPages(name) | 120 pages = pixel_test_pages.DefaultPages(name) |
121 pages += pixel_test_pages.GpuRasterizationPages(name) | 121 pages += pixel_test_pages.GpuRasterizationPages(name) |
122 pages += pixel_test_pages.ExperimentalCanvasFeaturesPages(name) | 122 pages += pixel_test_pages.ExperimentalCanvasFeaturesPages(name) |
123 if sys.platform.startswith('darwin'): | 123 if sys.platform.startswith('darwin'): |
124 pages += pixel_test_pages.MacSpecificPages(name) | 124 pages += pixel_test_pages.MacSpecificPages(name) |
| 125 if sys.platform.startswith('win'): |
| 126 pages += pixel_test_pages.DirectCompositionPages(name) |
125 for p in pages: | 127 for p in pages: |
126 yield(p.name, gpu_relative_path + p.url, (p)) | 128 yield(p.name, gpu_relative_path + p.url, (p)) |
127 | 129 |
128 def RunActualGpuTest(self, test_path, *args): | 130 def RunActualGpuTest(self, test_path, *args): |
129 page = args[0] | 131 page = args[0] |
130 # Some pixel tests require non-standard browser arguments. Need to | 132 # Some pixel tests require non-standard browser arguments. Need to |
131 # check before running each page that it can run in the current | 133 # check before running each page that it can run in the current |
132 # browser instance. | 134 # browser instance. |
133 self.RestartBrowserIfNecessaryWithArgs(page.browser_args) | 135 self.RestartBrowserIfNecessaryWithArgs(page.browser_args) |
134 url = self.UrlOfStaticFilePath(test_path) | 136 url = self.UrlOfStaticFilePath(test_path) |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 230 |
229 print ('Reference image not found. Writing tab contents as reference to: ' + | 231 print ('Reference image not found. Writing tab contents as reference to: ' + |
230 image_path) | 232 image_path) |
231 | 233 |
232 self._WriteImage(image_path, screenshot) | 234 self._WriteImage(image_path, screenshot) |
233 return screenshot | 235 return screenshot |
234 | 236 |
235 def load_tests(loader, tests, pattern): | 237 def load_tests(loader, tests, pattern): |
236 del loader, tests, pattern # Unused. | 238 del loader, tests, pattern # Unused. |
237 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 239 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
OLD | NEW |