Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: tools/telemetry/telemetry/core/browser_unittest.py

Issue 688903002: Do not save finder options in PossibleApp/PossibleBrowser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update PossibleBrowser.__init__ and Create callers. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/browser_unittest.py
diff --git a/tools/telemetry/telemetry/core/browser_unittest.py b/tools/telemetry/telemetry/core/browser_unittest.py
index 6d826d645554988305dc562d99e7b45435260cb6..9f1771fa968a73d8ea8068e9a2aae394f6fc7687 100644
--- a/tools/telemetry/telemetry/core/browser_unittest.py
+++ b/tools/telemetry/telemetry/core/browser_unittest.py
@@ -161,7 +161,7 @@ def _GenerateBrowserProfile(number_of_tabs):
options = options_for_unittests.GetCopy()
options.output_profile_path = profile_dir
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())
blank_file_path = os.path.join(path.GetUnittestDataDir(), 'blank.html')
blank_url = browser.http_server.UrlOf(blank_file_path)
@@ -180,16 +180,17 @@ class BrowserRestoreSessionTest(unittest.TestCase):
def setUpClass(cls):
cls._number_of_tabs = 4
cls._profile_dir = _GenerateBrowserProfile(cls._number_of_tabs)
- options = options_for_unittests.GetCopy()
- options.browser_options.AppendExtraBrowserArgs(['--restore-last-session'])
- options.browser_options.profile_dir = cls._profile_dir
- cls._browser_to_create = browser_finder.FindBrowser(options)
+ cls._options = options_for_unittests.GetCopy()
+ cls._options.browser_options.AppendExtraBrowserArgs(
+ ['--restore-last-session'])
+ cls._options.browser_options.profile_dir = cls._profile_dir
+ cls._browser_to_create = browser_finder.FindBrowser(cls._options)
@benchmark.Enabled('has tabs')
@benchmark.Disabled('chromeos', 'win')
# TODO(nednguyen): Enable this test on windowsn platform
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
# old tabs and a new blank tab.
expected_number_of_tabs = self._number_of_tabs + 1

Powered by Google App Engine
This is Rietveld 408576698