| OLD | NEW |
| 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 Loading... |
| 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) | |
| 246 | 245 |
| 247 for query, url in zip(SEARCH_QUERIES, URL_LIST): | 246 for query, url in zip(SEARCH_QUERIES, URL_LIST): |
| 248 # Stories that run on the android-webview browser. | 247 # Stories that run on the android-webview browser. |
| 249 self.AddStory(SinglePage( | 248 self.AddStory(SinglePage( |
| 250 name='google_%s' % re.sub(r'\W+', '_', query.lower()), | 249 name='google_%s' % re.sub(r'\W+', '_', query.lower()), |
| 251 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), | 250 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), |
| 252 browser_type='android-webview', | 251 browser_type='android-webview', |
| 253 phase='on_webview')) | 252 phase='on_webview')) |
| 254 | 253 |
| 255 # Stories that run on the browser selected by command line options. | 254 # Stories that run on the browser selected by command line options. |
| 256 self.AddStory(SinglePage( | 255 self.AddStory(SinglePage( |
| 257 name=re.sub(r'\W+', '_', url), | 256 name=re.sub(r'\W+', '_', url), |
| 258 url=url, | 257 url=url, |
| 259 browser_type='default', | 258 browser_type='default', |
| 260 phase='on_chrome')) | 259 phase='on_chrome')) |
| OLD | NEW |