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

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

Issue 2935783004: Explicitly setting names for stories in used page_sets (Closed)
Patch Set: Explicitly setting names for stories in used page_sets Created 3 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
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 urllib 8 import urllib
9 9
10 from telemetry import story as story_module 10 from telemetry import story as story_module
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 shared_state.current_tab.WaitForDocumentReadyStateToBeComplete() 234 shared_state.current_tab.WaitForDocumentReadyStateToBeComplete()
235 shared_state.TakeMemoryMeasurement() 235 shared_state.TakeMemoryMeasurement()
236 236
237 237
238 class DualBrowserStorySet(story_module.StorySet): 238 class DualBrowserStorySet(story_module.StorySet):
239 """A story set that switches back and forth between two browsers.""" 239 """A story set that switches back and forth between two browsers."""
240 240
241 def __init__(self): 241 def __init__(self):
242 super(DualBrowserStorySet, self).__init__( 242 super(DualBrowserStorySet, self).__init__(
243 archive_data_file='data/dual_browser_story.json', 243 archive_data_file='data/dual_browser_story.json',
244 cloud_storage_bucket=story_module.PARTNER_BUCKET) 244 cloud_storage_bucket=story_module.PARTNER_BUCKET,
245 verify_names=True)
245 246
246 for query, url in zip(SEARCH_QUERIES, URL_LIST): 247 for query, url in zip(SEARCH_QUERIES, URL_LIST):
247 # Stories that run on the android-webview browser. 248 # Stories that run on the android-webview browser.
248 self.AddStory(SinglePage( 249 self.AddStory(SinglePage(
249 name='google_%s' % re.sub(r'\W+', '_', query.lower()), 250 name='google_%s' % re.sub(r'\W+', '_', query.lower()),
250 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), 251 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}),
251 browser_type='android-webview', 252 browser_type='android-webview',
252 phase='on_webview')) 253 phase='on_webview'))
253 254
254 # Stories that run on the browser selected by command line options. 255 # Stories that run on the browser selected by command line options.
255 self.AddStory(SinglePage( 256 self.AddStory(SinglePage(
256 name=re.sub(r'\W+', '_', url), 257 name=re.sub(r'\W+', '_', url),
257 url=url, 258 url=url,
258 browser_type='default', 259 browser_type='default',
259 phase='on_chrome')) 260 phase='on_chrome'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698