OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 unittest | 4 import unittest |
5 | 5 |
6 from telemetry import browser_finder | 6 from telemetry import browser_finder |
7 from telemetry import options_for_unittests | 7 from telemetry import options_for_unittests |
8 | 8 |
9 class TabTestCase(unittest.TestCase): | 9 class TabTestCase(unittest.TestCase): |
10 def __init__(self, *args): | 10 def __init__(self, *args): |
(...skipping 16 matching lines...) Expand all Loading... |
27 raise Exception('No browser found, cannot continue test.') | 27 raise Exception('No browser found, cannot continue test.') |
28 try: | 28 try: |
29 self._browser = browser_to_create.Create() | 29 self._browser = browser_to_create.Create() |
30 self._tab = self._browser.tabs[0] | 30 self._tab = self._browser.tabs[0] |
31 except: | 31 except: |
32 self.tearDown() | 32 self.tearDown() |
33 raise | 33 raise |
34 | 34 |
35 def tearDown(self): | 35 def tearDown(self): |
36 if self._tab: | 36 if self._tab: |
37 self._tab.Disconnect() | 37 self._tab.Close() |
38 if self._browser: | 38 if self._browser: |
39 self._browser.Close() | 39 self._browser.Close() |
40 | 40 |
41 def CustomizeBrowserOptions(self, options): | 41 def CustomizeBrowserOptions(self, options): |
42 """Override to add test-specific options to the BrowserOptions object""" | 42 """Override to add test-specific options to the BrowserOptions object""" |
43 pass | 43 pass |
OLD | NEW |