| 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 from telemetry import story |
| 4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | |
| 6 from telemetry.page import shared_page_state | 6 from telemetry.page import shared_page_state |
| 7 | 7 |
| 8 | 8 |
| 9 class Typical10MobilePage(page_module.Page): | 9 class Typical10MobilePage(page_module.Page): |
| 10 | 10 |
| 11 def __init__(self, url, page_set, name=''): | 11 def __init__(self, url, page_set, name=''): |
| 12 super(Typical10MobilePage, self).__init__( | 12 super(Typical10MobilePage, self).__init__( |
| 13 url=url, page_set=page_set, name=name, | 13 url=url, page_set=page_set, name=name, |
| 14 credentials_path = 'data/credentials.json', | 14 credentials_path = 'data/credentials.json', |
| 15 shared_page_state_class=shared_page_state.SharedMobilePageState) | 15 shared_page_state_class=shared_page_state.SharedMobilePageState) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 'http://www.rg.ru/2014/10/21/cska-site.html', | 50 'http://www.rg.ru/2014/10/21/cska-site.html', |
| 51 # Why: Popular shopping site | 51 # Why: Popular shopping site |
| 52 'http://m.ebay.com/itm/351157205404', | 52 'http://m.ebay.com/itm/351157205404', |
| 53 # Why: Popular viral site, lots of images | 53 # Why: Popular viral site, lots of images |
| 54 'http://siriuslymeg.tumblr.com/', | 54 'http://siriuslymeg.tumblr.com/', |
| 55 # Why: Popular Chinese language site. | 55 # Why: Popular Chinese language site. |
| 56 'http://wapbaike.baidu.com/', | 56 'http://wapbaike.baidu.com/', |
| 57 ] | 57 ] |
| 58 | 58 |
| 59 | 59 |
| 60 class Typical10MobilePageSet(page_set_module.PageSet): | 60 class Typical10MobilePageSet(story.StorySet): |
| 61 """10 typical mobile pages, used for power testing.""" | 61 """10 typical mobile pages, used for power testing.""" |
| 62 | 62 |
| 63 def __init__(self): | 63 def __init__(self): |
| 64 super(Typical10MobilePageSet, self).__init__( | 64 super(Typical10MobilePageSet, self).__init__( |
| 65 archive_data_file='data/typical_10_mobile.json', | 65 archive_data_file='data/typical_10_mobile.json', |
| 66 bucket=page_set_module.PARTNER_BUCKET) | 66 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 67 | 67 |
| 68 for url in urls_list: | 68 for url in urls_list: |
| 69 self.AddUserStory(Typical10MobilePage(url, self)) | 69 self.AddUserStory(Typical10MobilePage(url, self)) |
| 70 | 70 |
| 71 class Typical10MobileReloadPageSet(page_set_module.PageSet): | 71 class Typical10MobileReloadPageSet(story.StorySet): |
| 72 """10 typical mobile pages, used for reloading power testing.""" | 72 """10 typical mobile pages, used for reloading power testing.""" |
| 73 | 73 |
| 74 def __init__(self): | 74 def __init__(self): |
| 75 super(Typical10MobileReloadPageSet, self).__init__( | 75 super(Typical10MobileReloadPageSet, self).__init__( |
| 76 archive_data_file='data/typical_10_mobile.json', | 76 archive_data_file='data/typical_10_mobile.json', |
| 77 bucket=page_set_module.PARTNER_BUCKET) | 77 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 78 | 78 |
| 79 for url in urls_list: | 79 for url in urls_list: |
| 80 self.AddUserStory(Typical10MobileReloadPage(url, self)) | 80 self.AddUserStory(Typical10MobileReloadPage(url, self)) |
| OLD | NEW |