| 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 sys | 8 import sys |
| 9 import urllib | 9 import urllib |
| 10 | 10 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 """A story set that switches back and forth between two browsers.""" | 247 """A story set that switches back and forth between two browsers.""" |
| 248 | 248 |
| 249 def __init__(self): | 249 def __init__(self): |
| 250 super(DualBrowserStorySet, self).__init__( | 250 super(DualBrowserStorySet, self).__init__( |
| 251 archive_data_file='data/dual_browser_story.json', | 251 archive_data_file='data/dual_browser_story.json', |
| 252 cloud_storage_bucket=story_module.PARTNER_BUCKET) | 252 cloud_storage_bucket=story_module.PARTNER_BUCKET) |
| 253 | 253 |
| 254 for query, url in zip(SEARCH_QUERIES, URL_LIST): | 254 for query, url in zip(SEARCH_QUERIES, URL_LIST): |
| 255 # Stories that run on the android-webview browser. | 255 # Stories that run on the android-webview browser. |
| 256 self.AddStory(SinglePage( | 256 self.AddStory(SinglePage( |
| 257 name='google_%s' % re.sub('\W+', '_', query.lower()), | 257 name='google_%s' % re.sub(r'\W+', '_', query.lower()), |
| 258 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), | 258 url=GOOGLE_SEARCH + urllib.urlencode({'q': query}), |
| 259 browser_type='android-webview', | 259 browser_type='android-webview', |
| 260 phase='on_webview')) | 260 phase='on_webview')) |
| 261 | 261 |
| 262 # Stories that run on the browser selected by command line options. | 262 # Stories that run on the browser selected by command line options. |
| 263 self.AddStory(SinglePage( | 263 self.AddStory(SinglePage( |
| 264 name=re.sub('\W+', '_', url), | 264 name=re.sub(r'\W+', '_', url), |
| 265 url=url, | 265 url=url, |
| 266 browser_type='default', | 266 browser_type='default', |
| 267 phase='on_chrome')) | 267 phase='on_chrome')) |
| OLD | NEW |