| 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 cloud_storage_integration_test_base | 11 from gpu_tests import cloud_storage_integration_test_base |
| 11 from gpu_tests import pixel_expectations | 12 from gpu_tests import pixel_expectations |
| 12 from gpu_tests import pixel_test_pages | 13 from gpu_tests import pixel_test_pages |
| 13 | 14 |
| 14 from py_utils import cloud_storage | 15 from py_utils import cloud_storage |
| 15 from telemetry.util import image_util | 16 from telemetry.util import image_util |
| 16 | 17 |
| 17 | 18 |
| 18 test_data_dir = os.path.abspath(os.path.join( | 19 test_data_dir = os.path.abspath(os.path.join( |
| 19 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) | 20 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 ref_png = None | 220 ref_png = None |
| 220 | 221 |
| 221 if ref_png is not None: | 222 if ref_png is not None: |
| 222 return ref_png | 223 return ref_png |
| 223 | 224 |
| 224 print ('Reference image not found. Writing tab contents as reference to: ' + | 225 print ('Reference image not found. Writing tab contents as reference to: ' + |
| 225 image_path) | 226 image_path) |
| 226 | 227 |
| 227 self._WriteImage(image_path, screenshot) | 228 self._WriteImage(image_path, screenshot) |
| 228 return screenshot | 229 return screenshot |
| 230 |
| 231 def load_tests(loader, tests, pattern): |
| 232 del loader, tests, pattern # Unused. |
| 233 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |