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

Side by Side Diff: tools/perf/page_sets/dual_browser_story.py

Issue 2073713003: [tools/perf] Keep both browsers open from the start of dual browser test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 collections 5 import collections
6 import logging 6 import logging
7 import re 7 import re
8 import sys 8 import sys
9 import urllib 9 import urllib
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if finder_options.use_live_sites: 94 if finder_options.use_live_sites:
95 wpr_mode = wpr_modes.WPR_OFF 95 wpr_mode = wpr_modes.WPR_OFF
96 elif browser_options.wpr_mode == wpr_modes.WPR_RECORD: 96 elif browser_options.wpr_mode == wpr_modes.WPR_RECORD:
97 wpr_mode = wpr_modes.WPR_RECORD 97 wpr_mode = wpr_modes.WPR_RECORD
98 else: 98 else:
99 wpr_mode = wpr_modes.WPR_REPLAY 99 wpr_mode = wpr_modes.WPR_REPLAY
100 100
101 self.platform.network_controller.Open(wpr_mode, 101 self.platform.network_controller.Open(wpr_mode,
102 browser_options.extra_wpr_args) 102 browser_options.extra_wpr_args)
103 103
104 # Make sure all browsers are open before starting.
105 for story in story_set:
106 if story.browser_type not in self._browsers:
107 self._SetCurrentBrowser(story.browser_type)
108
104 @property 109 @property
105 def current_tab(self): 110 def current_tab(self):
106 return self._current_tab 111 return self._current_tab
107 112
108 @property 113 @property
109 def platform(self): 114 def platform(self):
110 return self._platform 115 return self._platform
111 116
112 def _CheckTestEnabled(self, test, possible_browser): 117 def _CheckTestEnabled(self, test, possible_browser):
113 should_skip, msg = decorators.ShouldSkip(test, possible_browser) 118 should_skip, msg = decorators.ShouldSkip(test, possible_browser)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), 243 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}),
239 browser_type='android-webview', 244 browser_type='android-webview',
240 phase='on_webview')) 245 phase='on_webview'))
241 246
242 # Stories that run on the browser selected by command line options. 247 # Stories that run on the browser selected by command line options.
243 self.AddStory(SinglePage( 248 self.AddStory(SinglePage(
244 name=re.sub('\W+', '_', url), 249 name=re.sub('\W+', '_', url),
245 url=url, 250 url=url,
246 browser_type='default', 251 browser_type='default',
247 phase='on_chrome')) 252 phase='on_chrome'))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698