| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from telemetry import story |
| 5 from telemetry.page import page | 6 from telemetry.page import page |
| 6 from telemetry.page import page_set | |
| 7 | |
| 8 | 7 |
| 9 TOP_2013_URLS = [ | 8 TOP_2013_URLS = [ |
| 10 'http://www.facebook.com/barackobama', | 9 'http://www.facebook.com/barackobama', |
| 11 'https://www.google.com/search?q=barack%20obama', | 10 'https://www.google.com/search?q=barack%20obama', |
| 12 'http://youtube.com', | 11 'http://youtube.com', |
| 13 'http://yahoo.com', | 12 'http://yahoo.com', |
| 14 'http://www.baidu.com/s?wd=barack+obama', | 13 'http://www.baidu.com/s?wd=barack+obama', |
| 15 'http://en.wikipedia.org/wiki/Wikipedia', | 14 'http://en.wikipedia.org/wiki/Wikipedia', |
| 16 'http://qq.com', | 15 'http://qq.com', |
| 17 'http://www.amazon.com/Kindle-Fire-Amazon-Tablet/dp/B0051VVOB2', | 16 'http://www.amazon.com/Kindle-Fire-Amazon-Tablet/dp/B0051VVOB2', |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 def __init__(self, url, ps): | 251 def __init__(self, url, ps): |
| 253 super(Top2012Q3Page, self).__init__( | 252 super(Top2012Q3Page, self).__init__( |
| 254 url=url, page_set=ps, credentials_path = 'data/credentials.json') | 253 url=url, page_set=ps, credentials_path = 'data/credentials.json') |
| 255 self.archive_data_file = 'data/2012Q3.json' | 254 self.archive_data_file = 'data/2012Q3.json' |
| 256 | 255 |
| 257 def RunPageInteractions(self, action_runner): | 256 def RunPageInteractions(self, action_runner): |
| 258 with action_runner.CreateGestureInteraction('ScrollAction'): | 257 with action_runner.CreateGestureInteraction('ScrollAction'): |
| 259 action_runner.ScrollPage() | 258 action_runner.ScrollPage() |
| 260 | 259 |
| 261 | 260 |
| 262 class Top2012Q3PageSet(page_set.PageSet): | 261 class Top2012Q3PageSet(story.StorySet): |
| 263 """ Pages hand-picked from top-lists in Q32012. """ | 262 """ Pages hand-picked from top-lists in Q32012. """ |
| 264 | 263 |
| 265 def __init__(self): | 264 def __init__(self): |
| 266 super(Top2012Q3PageSet, self).__init__( | 265 super(Top2012Q3PageSet, self).__init__( |
| 267 archive_data_file='data/2012Q3.json', | 266 archive_data_file='data/2012Q3.json', |
| 268 bucket=page_set.PARTNER_BUCKET) | 267 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 269 | 268 |
| 270 | 269 |
| 271 for url in TOP_2013_URLS: | 270 for url in TOP_2013_URLS: |
| 272 self.AddUserStory(Top2012Q3Page(url, self)) | 271 self.AddUserStory(Top2012Q3Page(url, self)) |
| OLD | NEW |