| 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 logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import random | 7 import random |
| 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 21 matching lines...) Expand all Loading... |
| 32 # to relaunch it, if a new pixel test requires a different set of | 32 # to relaunch it, if a new pixel test requires a different set of |
| 33 # arguments. | 33 # arguments. |
| 34 _last_launched_browser_args = set() | 34 _last_launched_browser_args = set() |
| 35 | 35 |
| 36 @classmethod | 36 @classmethod |
| 37 def Name(cls): | 37 def Name(cls): |
| 38 """The name by which this test is invoked on the command line.""" | 38 """The name by which this test is invoked on the command line.""" |
| 39 return 'screenshot_sync' | 39 return 'screenshot_sync' |
| 40 | 40 |
| 41 @classmethod | 41 @classmethod |
| 42 def setUpClass(cls): | 42 def SetUpProcess(cls): |
| 43 super(cls, ScreenshotSyncIntegrationTest).setUpClass() | 43 super(cls, ScreenshotSyncIntegrationTest).SetUpProcess() |
| 44 cls._original_finder_options = cls._finder_options.Copy() | 44 cls._original_finder_options = cls._finder_options.Copy() |
| 45 cls.CustomizeBrowserArgs([]) | 45 cls.CustomizeBrowserArgs([]) |
| 46 cls.StartBrowser() | 46 cls.StartBrowser() |
| 47 cls.SetStaticServerDirs([data_path]) | 47 cls.SetStaticServerDirs([data_path]) |
| 48 | 48 |
| 49 @classmethod | 49 @classmethod |
| 50 def CustomizeBrowserArgs(cls, browser_args): | 50 def CustomizeBrowserArgs(cls, browser_args): |
| 51 if not browser_args: | 51 if not browser_args: |
| 52 browser_args = [] | 52 browser_args = [] |
| 53 cls._finder_options = cls._original_finder_options.Copy() | 53 cls._finder_options = cls._original_finder_options.Copy() |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 browser_arg = args[0] | 131 browser_arg = args[0] |
| 132 self.RestartBrowserIfNecessaryWithArgs([browser_arg]) | 132 self.RestartBrowserIfNecessaryWithArgs([browser_arg]) |
| 133 self._Navigate(test_path) | 133 self._Navigate(test_path) |
| 134 repetitions = 20 | 134 repetitions = 20 |
| 135 for _ in range(0, repetitions): | 135 for _ in range(0, repetitions): |
| 136 self._CheckScreenshot() | 136 self._CheckScreenshot() |
| 137 | 137 |
| 138 def load_tests(loader, tests, pattern): | 138 def load_tests(loader, tests, pattern): |
| 139 del loader, tests, pattern # Unused. | 139 del loader, tests, pattern # Unused. |
| 140 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 140 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |