| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 # to relaunch it, if a new pixel test requires a different set of | 56 # to relaunch it, if a new pixel test requires a different set of |
| 57 # arguments. | 57 # arguments. |
| 58 _last_launched_browser_args = set() | 58 _last_launched_browser_args = set() |
| 59 | 59 |
| 60 @classmethod | 60 @classmethod |
| 61 def Name(cls): | 61 def Name(cls): |
| 62 """The name by which this test is invoked on the command line.""" | 62 """The name by which this test is invoked on the command line.""" |
| 63 return 'pixel' | 63 return 'pixel' |
| 64 | 64 |
| 65 @classmethod | 65 @classmethod |
| 66 def setUpClass(cls): | 66 def SetUpProcess(cls): |
| 67 super(cls, PixelIntegrationTest).setUpClass() | 67 super(cls, PixelIntegrationTest).SetUpProcess() |
| 68 cls._original_finder_options = cls._finder_options.Copy() | 68 cls._original_finder_options = cls._finder_options.Copy() |
| 69 cls.CustomizeBrowserArgs([]) | 69 cls.CustomizeBrowserArgs([]) |
| 70 cls.StartBrowser() | 70 cls.StartBrowser() |
| 71 cls.SetStaticServerDirs([test_data_dir]) | 71 cls.SetStaticServerDirs([test_data_dir]) |
| 72 | 72 |
| 73 @classmethod | 73 @classmethod |
| 74 def CustomizeBrowserArgs(cls, browser_args): | 74 def CustomizeBrowserArgs(cls, browser_args): |
| 75 if not browser_args: | 75 if not browser_args: |
| 76 browser_args = [] | 76 browser_args = [] |
| 77 cls._finder_options = cls._original_finder_options.Copy() | 77 cls._finder_options = cls._original_finder_options.Copy() |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 print ('Reference image not found. Writing tab contents as reference to: ' + | 225 print ('Reference image not found. Writing tab contents as reference to: ' + |
| 226 image_path) | 226 image_path) |
| 227 | 227 |
| 228 self._WriteImage(image_path, screenshot) | 228 self._WriteImage(image_path, screenshot) |
| 229 return screenshot | 229 return screenshot |
| 230 | 230 |
| 231 def load_tests(loader, tests, pattern): | 231 def load_tests(loader, tests, pattern): |
| 232 del loader, tests, pattern # Unused. | 232 del loader, tests, pattern # Unused. |
| 233 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 233 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |