Commit 94a58f5d authored by slamm's avatar slamm Committed by Commit bot

Do not save finder options in PossibleApp/PossibleBrowser.

Without this, the browser may get created with old finder_options because FindBrowser has a caching decorator.

This should fix flakiness of telemetry/page/page_runner_unittest/PageRunnerTests/testUserAgent.

http://build.chromium.org/f/chromium/flakiness/
[test type: telemetry_unittests]

BUG=428967

Review URL: https://codereview.chromium.org/688903002

Cr-Commit-Position: refs/heads/master@{#302504}
parent 66f514ae
...@@ -47,7 +47,7 @@ class CrOSAutoTest(unittest.TestCase): ...@@ -47,7 +47,7 @@ class CrOSAutoTest(unittest.TestCase):
self.assertTrue(browser_to_create) self.assertTrue(browser_to_create)
options.browser_options.create_browser_with_oobe = True options.browser_options.create_browser_with_oobe = True
options.browser_options.auto_login = auto_login options.browser_options.auto_login = auto_login
b = browser_to_create.Create() b = browser_to_create.Create(options)
b.Start() b.Start()
return b return b
......
...@@ -20,7 +20,7 @@ def Main(args): ...@@ -20,7 +20,7 @@ def Main(args):
browser_to_create = browser_finder.FindBrowser(options) browser_to_create = browser_finder.FindBrowser(options)
assert browser_to_create assert browser_to_create
with browser_to_create.Create() as b: with browser_to_create.Create(options) as b:
tab = b.tabs[0] tab = b.tabs[0]
# Measure round-trip-time for evaluate # Measure round-trip-time for evaluate
......
...@@ -10,7 +10,7 @@ class AndroidApp(app.App): ...@@ -10,7 +10,7 @@ class AndroidApp(app.App):
Be sure to clean up after yourself by calling Close() when you are done with Be sure to clean up after yourself by calling Close() when you are done with
the app. Or better yet: the app. Or better yet:
with possible_android_app.Create() as android_app: with possible_android_app.Create(options) as android_app:
... do all your operations on android_app here ... do all your operations on android_app here
""" """
def __init__(self, backend, platform_backend): def __init__(self, backend, platform_backend):
......
...@@ -7,7 +7,7 @@ class App(object): ...@@ -7,7 +7,7 @@ class App(object):
Be sure to clean up after yourself by calling Close() when you are done with Be sure to clean up after yourself by calling Close() when you are done with
the app. Or better yet: the app. Or better yet:
with possible_app.Create() as app: with possible_app.Create(options) as app:
... do all your operations on app here ... do all your operations on app here
""" """
def __init__(self, app_backend, platform_backend): def __init__(self, app_backend, platform_backend):
......
...@@ -70,15 +70,14 @@ class PossibleAndroidBrowser(possible_browser.PossibleBrowser): ...@@ -70,15 +70,14 @@ class PossibleAndroidBrowser(possible_browser.PossibleBrowser):
"""A launchable android browser instance.""" """A launchable android browser instance."""
def __init__(self, browser_type, finder_options, android_platform, def __init__(self, browser_type, finder_options, android_platform,
backend_settings, apk_name): backend_settings, apk_name):
super(PossibleAndroidBrowser, self).__init__(browser_type, 'android', super(PossibleAndroidBrowser, self).__init__(
finder_options, backend_settings.supports_tab_control) browser_type, 'android', backend_settings.supports_tab_control)
assert browser_type in FindAllBrowserTypes(finder_options), \ assert browser_type in FindAllBrowserTypes(finder_options), (
('Please add %s to android_browser_finder.FindAllBrowserTypes' % 'Please add %s to android_browser_finder.FindAllBrowserTypes' %
browser_type) browser_type)
self._platform = android_platform self._platform = android_platform
self._platform_backend = ( self._platform_backend = (
android_platform._platform_backend # pylint: disable=W0212 android_platform._platform_backend) # pylint: disable=W0212
)
self._backend_settings = backend_settings self._backend_settings = backend_settings
self._local_apk = None self._local_apk = None
...@@ -103,21 +102,21 @@ class PossibleAndroidBrowser(possible_browser.PossibleBrowser): ...@@ -103,21 +102,21 @@ class PossibleAndroidBrowser(possible_browser.PossibleBrowser):
def _InitPlatformIfNeeded(self): def _InitPlatformIfNeeded(self):
pass pass
def Create(self): def Create(self, finder_options):
self._InitPlatformIfNeeded() self._InitPlatformIfNeeded()
use_rndis_forwarder = (self.finder_options.android_rndis or use_rndis_forwarder = (finder_options.android_rndis or
self.finder_options.browser_options.netsim or finder_options.browser_options.netsim or
platform.GetHostPlatform().GetOSName() != 'linux') platform.GetHostPlatform().GetOSName() != 'linux')
backend = android_browser_backend.AndroidBrowserBackend( browser_backend = android_browser_backend.AndroidBrowserBackend(
self.finder_options.browser_options, self._backend_settings, finder_options.browser_options, self._backend_settings,
use_rndis_forwarder, use_rndis_forwarder,
output_profile_path=self.finder_options.output_profile_path, output_profile_path=finder_options.output_profile_path,
extensions_to_load=self.finder_options.extensions_to_load, extensions_to_load=finder_options.extensions_to_load,
target_arch=self.finder_options.target_arch, target_arch=finder_options.target_arch,
android_platform_backend=self._platform_backend) android_platform_backend=self._platform_backend)
return browser.Browser( return browser.Browser(
backend, self._platform_backend, self._credentials_path) browser_backend, self._platform_backend, self._credentials_path)
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
......
...@@ -22,10 +22,9 @@ def _IsRunningOnCrOS(): ...@@ -22,10 +22,9 @@ def _IsRunningOnCrOS():
class PossibleCrOSBrowser(possible_browser.PossibleBrowser): class PossibleCrOSBrowser(possible_browser.PossibleBrowser):
"""A launchable CrOS browser instance.""" """A launchable CrOS browser instance."""
def __init__(self, browser_type, finder_options, cros_platform, is_guest): def __init__(self, browser_type, finder_options, cros_platform, is_guest):
super(PossibleCrOSBrowser, self).__init__(browser_type, 'cros', super(PossibleCrOSBrowser, self).__init__(browser_type, 'cros', True)
finder_options, True) assert browser_type in FindAllBrowserTypes(finder_options), (
assert browser_type in FindAllBrowserTypes(finder_options), \ 'Please add %s to cros_browser_finder.FindAllBrowserTypes()' %
('Please add %s to cros_browser_finder.FindAllBrowserTypes()' %
browser_type) browser_type)
self._platform = cros_platform self._platform = cros_platform
self._platform_backend = ( self._platform_backend = (
...@@ -38,22 +37,22 @@ class PossibleCrOSBrowser(possible_browser.PossibleBrowser): ...@@ -38,22 +37,22 @@ class PossibleCrOSBrowser(possible_browser.PossibleBrowser):
def _InitPlatformIfNeeded(self): def _InitPlatformIfNeeded(self):
pass pass
def Create(self): def Create(self, finder_options):
if self.finder_options.output_profile_path: if finder_options.output_profile_path:
raise NotImplementedError( raise NotImplementedError(
'Profile generation is not yet supported on CrOS.') 'Profile generation is not yet supported on CrOS.')
browser_options = self.finder_options.browser_options browser_options = finder_options.browser_options
backend = cros_browser_backend.CrOSBrowserBackend( browser_backend = cros_browser_backend.CrOSBrowserBackend(
browser_options, self._platform_backend.cri, self._is_guest, browser_options, self._platform_backend.cri, self._is_guest,
extensions_to_load=self.finder_options.extensions_to_load) extensions_to_load=finder_options.extensions_to_load)
if browser_options.create_browser_with_oobe: if browser_options.create_browser_with_oobe:
return cros_browser_with_oobe.CrOSBrowserWithOOBE( return cros_browser_with_oobe.CrOSBrowserWithOOBE(
backend, browser_backend,
self._platform_backend, self._platform_backend,
self._credentials_path) self._credentials_path)
return browser.Browser( return browser.Browser(
backend, self._platform_backend, self._credentials_path) browser_backend, self._platform_backend, self._credentials_path)
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
if (len(finder_options.extensions_to_load) != 0) and self._is_guest: if (len(finder_options.extensions_to_load) != 0) and self._is_guest:
......
...@@ -48,7 +48,7 @@ class CrOSTestCase(unittest.TestCase): ...@@ -48,7 +48,7 @@ class CrOSTestCase(unittest.TestCase):
if password is not None: if password is not None:
browser_options.password = password browser_options.password = password
return browser_to_create.Create() return browser_to_create.Create(options)
def _GetAutotestExtension(self, browser): def _GetAutotestExtension(self, browser):
"""Returns the autotest extension instance""" """Returns the autotest extension instance"""
......
...@@ -21,11 +21,11 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser): ...@@ -21,11 +21,11 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser):
def __init__(self, browser_type, finder_options, executable, flash_path, def __init__(self, browser_type, finder_options, executable, flash_path,
is_content_shell, browser_directory, is_local_build=False): is_content_shell, browser_directory, is_local_build=False):
target_os = sys.platform.lower() target_os = sys.platform.lower()
super(PossibleDesktopBrowser, self).__init__(browser_type, target_os, super(PossibleDesktopBrowser, self).__init__(
finder_options, not is_content_shell) browser_type, target_os, not is_content_shell)
assert browser_type in FindAllBrowserTypes(finder_options), \ assert browser_type in FindAllBrowserTypes(finder_options), (
('Please add %s to desktop_browser_finder.FindAllBrowserTypes' % 'Please add %s to desktop_browser_finder.FindAllBrowserTypes' %
browser_type) browser_type)
self._local_executable = executable self._local_executable = executable
self._flash_path = flash_path self._flash_path = flash_path
self._is_content_shell = is_content_shell self._is_content_shell = is_content_shell
...@@ -45,7 +45,7 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser): ...@@ -45,7 +45,7 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser):
# pylint: disable=W0212 # pylint: disable=W0212
self._platform_backend = self._platform._platform_backend self._platform_backend = self._platform._platform_backend
def Create(self): def Create(self, finder_options):
if self._flash_path and not os.path.exists(self._flash_path): if self._flash_path and not os.path.exists(self._flash_path):
logging.warning( logging.warning(
'Could not find Flash at %s. Continuing without Flash.\n' 'Could not find Flash at %s. Continuing without Flash.\n'
...@@ -55,13 +55,13 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser): ...@@ -55,13 +55,13 @@ class PossibleDesktopBrowser(possible_browser.PossibleBrowser):
self._InitPlatformIfNeeded() self._InitPlatformIfNeeded()
backend = desktop_browser_backend.DesktopBrowserBackend( browser_backend = desktop_browser_backend.DesktopBrowserBackend(
self.finder_options.browser_options, self._local_executable, finder_options.browser_options, self._local_executable,
self._flash_path, self._is_content_shell, self._browser_directory, self._flash_path, self._is_content_shell, self._browser_directory,
output_profile_path=self.finder_options.output_profile_path, output_profile_path=finder_options.output_profile_path,
extensions_to_load=self.finder_options.extensions_to_load) extensions_to_load=finder_options.extensions_to_load)
return browser.Browser( return browser.Browser(
backend, self._platform_backend, self._credentials_path) browser_backend, self._platform_backend, self._credentials_path)
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
if (len(finder_options.extensions_to_load) != 0) and self._is_content_shell: if (len(finder_options.extensions_to_load) != 0) and self._is_content_shell:
......
...@@ -27,16 +27,15 @@ IOS_WEBKIT_DEBUG_PROXY = 'ios_webkit_debug_proxy' ...@@ -27,16 +27,15 @@ IOS_WEBKIT_DEBUG_PROXY = 'ios_webkit_debug_proxy'
class PossibleIOSBrowser(possible_browser.PossibleBrowser): class PossibleIOSBrowser(possible_browser.PossibleBrowser):
"""A running iOS browser instance.""" """A running iOS browser instance."""
def __init__(self, browser_type, finder_options): def __init__(self, browser_type, _):
super(PossibleIOSBrowser, self).__init__(browser_type, 'ios', super(PossibleIOSBrowser, self).__init__(browser_type, 'ios', True)
finder_options, True)
# TODO(baxley): Implement the following methods for iOS. # TODO(baxley): Implement the following methods for iOS.
def Create(self): def Create(self, finder_options):
backend = ios_browser_backend.IosBrowserBackend( browser_backend = ios_browser_backend.IosBrowserBackend(
self.finder_options.browser_options) finder_options.browser_options)
return browser.Browser( return browser.Browser(
backend, self._platform_backend, self._credentials_path) browser_backend, self._platform_backend, self._credentials_path)
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
#TODO(baxley): Implement me. #TODO(baxley): Implement me.
......
...@@ -36,7 +36,7 @@ class FormBasedCredentialsBackendUnitTestBase(unittest.TestCase): ...@@ -36,7 +36,7 @@ class FormBasedCredentialsBackendUnitTestBase(unittest.TestCase):
return return
options = options_for_unittests.GetCopy() options = options_for_unittests.GetCopy()
with browser_finder.FindBrowser(options).Create() as b: with browser_finder.FindBrowser(options).Create(options) as b:
b.credentials.credentials_path = credentials_path b.credentials.credentials_path = credentials_path
if not b.credentials.CanLogin(self._credentials_type): if not b.credentials.CanLogin(self._credentials_type):
return return
......
...@@ -24,14 +24,13 @@ SUCCESS, NO_CHANGES, ERROR = range(3) ...@@ -24,14 +24,13 @@ SUCCESS, NO_CHANGES, ERROR = range(3)
class PossibleTrybotBrowser(possible_browser.PossibleBrowser): class PossibleTrybotBrowser(possible_browser.PossibleBrowser):
"""A script that sends a job to a trybot.""" """A script that sends a job to a trybot."""
def __init__(self, browser_type, finder_options): def __init__(self, browser_type, _):
target_os = browser_type.split('-')[1] target_os = browser_type.split('-')[1]
self._buildername = '%s_perf_bisect' % browser_type.replace( self._buildername = '%s_perf_bisect' % browser_type.replace(
'trybot-', '').replace('-', '_') 'trybot-', '').replace('-', '_')
super(PossibleTrybotBrowser, self).__init__(browser_type, target_os, super(PossibleTrybotBrowser, self).__init__(browser_type, target_os, True)
finder_options, True)
def Create(self): def Create(self, finder_options):
raise NotImplementedError() raise NotImplementedError()
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
......
...@@ -46,7 +46,7 @@ class PossibleWebDriverBrowser(possible_browser.PossibleBrowser): ...@@ -46,7 +46,7 @@ class PossibleWebDriverBrowser(possible_browser.PossibleBrowser):
# pylint: disable=W0212 # pylint: disable=W0212
self._platform_backend = self._platform._platform_backend self._platform_backend = self._platform._platform_backend
def Create(self): def Create(self, finder_options):
self._InitPlatformIfNeeded() self._InitPlatformIfNeeded()
backend = self.CreateWebDriverBackend(self._platform_backend) backend = self.CreateWebDriverBackend(self._platform_backend)
return browser.Browser(backend, return browser.Browser(backend,
......
...@@ -23,7 +23,7 @@ class Browser(app.App): ...@@ -23,7 +23,7 @@ class Browser(app.App):
Be sure to clean up after yourself by calling Close() when you are done with Be sure to clean up after yourself by calling Close() when you are done with
the browser. Or better yet: the browser. Or better yet:
browser_to_create = FindBrowser(options) browser_to_create = FindBrowser(options)
with browser_to_create.Create() as browser: with browser_to_create.Create(options) as browser:
... do all your operations on browser here ... do all your operations on browser here
""" """
def __init__(self, backend, platform_backend, credentials_path): def __init__(self, backend, platform_backend, credentials_path):
......
...@@ -161,7 +161,7 @@ def _GenerateBrowserProfile(number_of_tabs): ...@@ -161,7 +161,7 @@ def _GenerateBrowserProfile(number_of_tabs):
options = options_for_unittests.GetCopy() options = options_for_unittests.GetCopy()
options.output_profile_path = profile_dir options.output_profile_path = profile_dir
browser_to_create = browser_finder.FindBrowser(options) browser_to_create = browser_finder.FindBrowser(options)
with browser_to_create.Create() as browser: with browser_to_create.Create(options) as browser:
browser.SetHTTPServerDirectories(path.GetUnittestDataDir()) browser.SetHTTPServerDirectories(path.GetUnittestDataDir())
blank_file_path = os.path.join(path.GetUnittestDataDir(), 'blank.html') blank_file_path = os.path.join(path.GetUnittestDataDir(), 'blank.html')
blank_url = browser.http_server.UrlOf(blank_file_path) blank_url = browser.http_server.UrlOf(blank_file_path)
...@@ -180,16 +180,17 @@ class BrowserRestoreSessionTest(unittest.TestCase): ...@@ -180,16 +180,17 @@ class BrowserRestoreSessionTest(unittest.TestCase):
def setUpClass(cls): def setUpClass(cls):
cls._number_of_tabs = 4 cls._number_of_tabs = 4
cls._profile_dir = _GenerateBrowserProfile(cls._number_of_tabs) cls._profile_dir = _GenerateBrowserProfile(cls._number_of_tabs)
options = options_for_unittests.GetCopy() cls._options = options_for_unittests.GetCopy()
options.browser_options.AppendExtraBrowserArgs(['--restore-last-session']) cls._options.browser_options.AppendExtraBrowserArgs(
options.browser_options.profile_dir = cls._profile_dir ['--restore-last-session'])
cls._browser_to_create = browser_finder.FindBrowser(options) cls._options.browser_options.profile_dir = cls._profile_dir
cls._browser_to_create = browser_finder.FindBrowser(cls._options)
@benchmark.Enabled('has tabs') @benchmark.Enabled('has tabs')
@benchmark.Disabled('chromeos', 'win') @benchmark.Disabled('chromeos', 'win')
# TODO(nednguyen): Enable this test on windowsn platform # TODO(nednguyen): Enable this test on windowsn platform
def testRestoreBrowserWithMultipleTabs(self): def testRestoreBrowserWithMultipleTabs(self):
with self._browser_to_create.Create() as browser: with self._browser_to_create.Create(self._options) as browser:
# The number of tabs will be self._number_of_tabs + 1 as it includes the # The number of tabs will be self._number_of_tabs + 1 as it includes the
# old tabs and a new blank tab. # old tabs and a new blank tab.
expected_number_of_tabs = self._number_of_tabs + 1 expected_number_of_tabs = self._number_of_tabs + 1
......
...@@ -31,7 +31,7 @@ class ExtensionTest(unittest.TestCase): ...@@ -31,7 +31,7 @@ class ExtensionTest(unittest.TestCase):
if not browser_to_create: if not browser_to_create:
# May not find a browser that supports extensions. # May not find a browser that supports extensions.
return False return False
self._browser = browser_to_create.Create() self._browser = browser_to_create.Create(options)
self._extension = self._browser.extensions[load_extension] self._extension = self._browser.extensions[load_extension]
self._extension_id = load_extension.extension_id self._extension_id = load_extension.extension_id
self.assertTrue(self._extension) self.assertTrue(self._extension)
...@@ -96,7 +96,7 @@ class NonExistentExtensionTest(unittest.TestCase): ...@@ -96,7 +96,7 @@ class NonExistentExtensionTest(unittest.TestCase):
load_extension = extension_to_load.ExtensionToLoad( load_extension = extension_to_load.ExtensionToLoad(
extension_path, options.browser_type) extension_path, options.browser_type)
browser_to_create = browser_finder.FindBrowser(options) browser_to_create = browser_finder.FindBrowser(options)
with browser_to_create.Create() as b: with browser_to_create.Create(options) as b:
if b.supports_extensions: if b.supports_extensions:
self.assertRaises(KeyError, lambda: b.extensions[load_extension]) self.assertRaises(KeyError, lambda: b.extensions[load_extension])
...@@ -122,7 +122,7 @@ class MultipleExtensionTest(unittest.TestCase): ...@@ -122,7 +122,7 @@ class MultipleExtensionTest(unittest.TestCase):
self._browser = None self._browser = None
# May not find a browser that supports extensions. # May not find a browser that supports extensions.
if browser_to_create: if browser_to_create:
self._browser = browser_to_create.Create() self._browser = browser_to_create.Create(options)
def tearDown(self): def tearDown(self):
if self._browser: if self._browser:
...@@ -165,7 +165,7 @@ class ComponentExtensionTest(unittest.TestCase): ...@@ -165,7 +165,7 @@ class ComponentExtensionTest(unittest.TestCase):
'skipping test.') 'skipping test.')
return return
with browser_to_create.Create() as b: with browser_to_create.Create(options) as b:
extension = b.extensions[load_extension] extension = b.extensions[load_extension]
self.assertTrue( self.assertTrue(
extension.EvaluateJavaScript('chrome.runtime != null')) extension.EvaluateJavaScript('chrome.runtime != null'))
......
...@@ -9,10 +9,9 @@ class PossibleApp(object): ...@@ -9,10 +9,9 @@ class PossibleApp(object):
Call Create() to launch the app and begin manipulating it. Call Create() to launch the app and begin manipulating it.
""" """
def __init__(self, app_type, target_os, finder_options): def __init__(self, app_type, target_os):
self._app_type = app_type self._app_type = app_type
self._target_os = target_os self._target_os = target_os
self._finder_options = finder_options
self._platform = None self._platform = None
self._platform_backend = None self._platform_backend = None
...@@ -28,10 +27,6 @@ class PossibleApp(object): ...@@ -28,10 +27,6 @@ class PossibleApp(object):
"""Target OS, the app will run on.""" """Target OS, the app will run on."""
return self._target_os return self._target_os
@property
def finder_options(self):
return self._finder_options
@property @property
def platform(self): def platform(self):
self._InitPlatformIfNeeded() self._InitPlatformIfNeeded()
...@@ -40,7 +35,7 @@ class PossibleApp(object): ...@@ -40,7 +35,7 @@ class PossibleApp(object):
def _InitPlatformIfNeeded(self): def _InitPlatformIfNeeded(self):
raise NotImplementedError() raise NotImplementedError()
def Create(self): def Create(self, finder_options):
raise NotImplementedError() raise NotImplementedError()
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
......
...@@ -11,11 +11,9 @@ class PossibleBrowser(possible_app.PossibleApp): ...@@ -11,11 +11,9 @@ class PossibleBrowser(possible_app.PossibleApp):
Call Create() to launch the browser and begin manipulating it.. Call Create() to launch the browser and begin manipulating it..
""" """
def __init__(self, browser_type, target_os, finder_options, def __init__(self, browser_type, target_os, supports_tab_control):
supports_tab_control):
super(PossibleBrowser, self).__init__(app_type=browser_type, super(PossibleBrowser, self).__init__(app_type=browser_type,
target_os=target_os, target_os=target_os)
finder_options=finder_options)
self._supports_tab_control = supports_tab_control self._supports_tab_control = supports_tab_control
self._credentials_path = None self._credentials_path = None
...@@ -33,7 +31,7 @@ class PossibleBrowser(possible_app.PossibleApp): ...@@ -33,7 +31,7 @@ class PossibleBrowser(possible_app.PossibleApp):
def _InitPlatformIfNeeded(self): def _InitPlatformIfNeeded(self):
raise NotImplementedError() raise NotImplementedError()
def Create(self): def Create(self, finder_options):
raise NotImplementedError() raise NotImplementedError()
def SupportsOptions(self, finder_options): def SupportsOptions(self, finder_options):
......
...@@ -75,7 +75,7 @@ class _RunState(object): ...@@ -75,7 +75,7 @@ class _RunState(object):
possible_browser.SetCredentialsPath(page.credentials_path) possible_browser.SetCredentialsPath(page.credentials_path)
test.WillStartBrowser(possible_browser.platform) test.WillStartBrowser(possible_browser.platform)
self.browser = possible_browser.Create() self.browser = possible_browser.Create(finder_options)
test.DidStartBrowser(self.browser) test.DidStartBrowser(self.browser)
if self._first_browser: if self._first_browser:
......
...@@ -21,7 +21,7 @@ class BrowserTestCase(unittest.TestCase): ...@@ -21,7 +21,7 @@ class BrowserTestCase(unittest.TestCase):
cls._browser = None cls._browser = None
try: try:
cls._browser = browser_to_create.Create() cls._browser = browser_to_create.Create(options)
except: except:
cls.tearDownClass() cls.tearDownClass()
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment