Chromium Code Reviews| Index: pyautolib/pyauto.py |
| =================================================================== |
| --- pyautolib/pyauto.py (revision 136323) |
| +++ pyautolib/pyauto.py (working copy) |
| @@ -49,6 +49,7 @@ |
| import urllib |
| import pyauto_paths |
| +from py_unittest_util import GTestTextTestRunner |
| def _LocateBinDirs(): |
| @@ -134,11 +135,15 @@ |
| homepage: the home page. Defaults to "about:blank" |
| """ |
| # Fetch provided keyword args, or fill in defaults. |
| + browser_path = kwargs.get('browser_path', None) |
| clear_profile = kwargs.get('clear_profile', True) |
| homepage = kwargs.get('homepage', 'about:blank') |
| pyautolib.PyUITestBase.__init__(self, clear_profile, homepage) |
| - self.Initialize(pyautolib.FilePath(self.BrowserPath())) |
| + if browser_path: |
| + self.Initialize(pyautolib.FilePath(browser_path)) |
| + else: |
| + self.Initialize(pyautolib.FilePath(self.BrowserPath())) |
| unittest.TestCase.__init__(self, methodName) |
| # Give all pyauto tests easy access to pprint.PrettyPrinter functions. |
| @@ -5736,7 +5741,8 @@ |
| verbosity = 1 |
| if self._options.verbose: |
| verbosity = 2 |
| - result = PyAutoTextTestRunner(verbosity=verbosity).run(pyauto_suite) |
| + #result = PyAutoTextTestRunner(verbosity=verbosity).run(pyauto_suite) |
|
kkania
2012/05/22 16:36:42
remove
|
| + result = GTestTextTestRunner(verbosity=verbosity).run(pyauto_suite) |
| del loaded_tests # Need to destroy test cases before the suite |
| del pyauto_suite |
| successful = result.wasSuccessful() |