| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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 import json | 5 import json |
| 6 import os | 6 import os |
| 7 import sys |
| 7 | 8 |
| 9 from gpu_tests import gpu_integration_test |
| 8 from gpu_tests import cloud_storage_integration_test_base | 10 from gpu_tests import cloud_storage_integration_test_base |
| 9 from gpu_tests import maps_expectations | 11 from gpu_tests import maps_expectations |
| 10 from gpu_tests import path_util | 12 from gpu_tests import path_util |
| 11 | 13 |
| 12 import py_utils | 14 import py_utils |
| 13 from py_utils import cloud_storage | 15 from py_utils import cloud_storage |
| 14 | 16 |
| 15 data_path = os.path.join(path_util.GetChromiumSrcDir(), | 17 data_path = os.path.join(path_util.GetChromiumSrcDir(), |
| 16 'content', 'test', 'gpu', 'page_sets', 'data') | 18 'content', 'test', 'gpu', 'page_sets', 'data') |
| 17 | 19 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 # Even though the Maps test uses a fixed devicePixelRatio so that | 133 # Even though the Maps test uses a fixed devicePixelRatio so that |
| 132 # it fetches all of the map tiles at the same resolution, on two | 134 # it fetches all of the map tiles at the same resolution, on two |
| 133 # different devices with the same devicePixelRatio (a Retina | 135 # different devices with the same devicePixelRatio (a Retina |
| 134 # MacBook Pro and a Nexus 9), different scale factors of the final | 136 # MacBook Pro and a Nexus 9), different scale factors of the final |
| 135 # screenshot are observed. Hack around this by specifying a scale | 137 # screenshot are observed. Hack around this by specifying a scale |
| 136 # factor for these bots in the test expectations. This relies on | 138 # factor for these bots in the test expectations. This relies on |
| 137 # the test-machine-name argument being specified on the command | 139 # the test-machine-name argument being specified on the command |
| 138 # line. | 140 # line. |
| 139 expected = self._ReadPixelExpectations(pixel_expectations_file) | 141 expected = self._ReadPixelExpectations(pixel_expectations_file) |
| 140 self._ValidateScreenshotSamples(tab, url, screenshot, expected, dpr) | 142 self._ValidateScreenshotSamples(tab, url, screenshot, expected, dpr) |
| 143 |
| 144 def load_tests(loader, tests, pattern): |
| 145 del loader, tests, pattern # Unused. |
| 146 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |