| 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 | 4 |
| 5 import os | 5 import os |
| 6 import sys | 6 import sys |
| 7 import time | 7 import time |
| 8 | 8 |
| 9 from gpu_tests import gpu_integration_test | 9 from gpu_tests import gpu_integration_test |
| 10 from gpu_tests import context_lost_expectations | 10 from gpu_tests import context_lost_expectations |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 tab = self.tab | 90 tab = self.tab |
| 91 if not tab.browser.supports_tab_control: | 91 if not tab.browser.supports_tab_control: |
| 92 self.fail('Browser must support tab control') | 92 self.fail('Browser must support tab control') |
| 93 getattr(self, test_name)(test_path) | 93 getattr(self, test_name)(test_path) |
| 94 | 94 |
| 95 @classmethod | 95 @classmethod |
| 96 def _CreateExpectations(cls): | 96 def _CreateExpectations(cls): |
| 97 return context_lost_expectations.ContextLostExpectations() | 97 return context_lost_expectations.ContextLostExpectations() |
| 98 | 98 |
| 99 @classmethod | 99 @classmethod |
| 100 def setUpClass(cls): | 100 def SetUpProcess(cls): |
| 101 super(cls, ContextLostIntegrationTest).setUpClass() | 101 super(cls, ContextLostIntegrationTest).SetUpProcess() |
| 102 cls.CustomizeOptions() | 102 cls.CustomizeOptions() |
| 103 cls.SetBrowserOptions(cls._finder_options) | 103 cls.SetBrowserOptions(cls._finder_options) |
| 104 cls.StartBrowser() | 104 cls.StartBrowser() |
| 105 cls.SetStaticServerDirs([data_path]) | 105 cls.SetStaticServerDirs([data_path]) |
| 106 | 106 |
| 107 def _WaitForPageToFinish(self, tab): | 107 def _WaitForPageToFinish(self, tab): |
| 108 try: | 108 try: |
| 109 tab.WaitForJavaScriptCondition2( | 109 tab.WaitForJavaScriptCondition2( |
| 110 'window.domAutomationController._finished', timeout=wait_timeout) | 110 'window.domAutomationController._finished', timeout=wait_timeout) |
| 111 return True | 111 return True |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 # doesn't crash. | 248 # doesn't crash. |
| 249 tab = self.tab | 249 tab = self.tab |
| 250 dummy_tab = tab.browser.tabs.New() | 250 dummy_tab = tab.browser.tabs.New() |
| 251 tab.EvaluateJavaScript2('loseContextUsingExtension()') | 251 tab.EvaluateJavaScript2('loseContextUsingExtension()') |
| 252 tab.Activate() | 252 tab.Activate() |
| 253 self._WaitForTabAndCheckCompletion() | 253 self._WaitForTabAndCheckCompletion() |
| 254 | 254 |
| 255 def load_tests(loader, tests, pattern): | 255 def load_tests(loader, tests, pattern): |
| 256 del loader, tests, pattern # Unused. | 256 del loader, tests, pattern # Unused. |
| 257 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 257 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
| OLD | NEW |