| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry.page import shared_page_state | 5 from telemetry.page import shared_page_state |
| 6 from telemetry import story | 6 from telemetry import story |
| 7 | 7 |
| 8 | 8 |
| 9 class PathologicalMobileSitesPage(page_module.Page): | 9 class PathologicalMobileSitesPage(page_module.Page): |
| 10 | 10 |
| 11 def __init__(self, url, page_set): | 11 def __init__(self, url, page_set): |
| 12 super(PathologicalMobileSitesPage, self).__init__( | 12 super(PathologicalMobileSitesPage, self).__init__( |
| 13 url=url, page_set=page_set, credentials_path='data/credentials.json', | 13 url=url, page_set=page_set, credentials_path='data/credentials.json', |
| 14 shared_page_state_class=shared_page_state.SharedMobilePageState) | 14 shared_page_state_class=shared_page_state.SharedMobilePageState) |
| 15 self.archive_data_file = 'data/pathological_mobile_sites.json' | |
| 16 | 15 |
| 17 def RunPageInteractions(self, action_runner): | 16 def RunPageInteractions(self, action_runner): |
| 18 with action_runner.CreateGestureInteraction('ScrollAction'): | 17 with action_runner.CreateGestureInteraction('ScrollAction'): |
| 19 action_runner.ScrollPage() | 18 action_runner.ScrollPage() |
| 20 | 19 |
| 21 | 20 |
| 22 class PathologicalMobileSitesPageSet(story.StorySet): | 21 class PathologicalMobileSitesPageSet(story.StorySet): |
| 23 | 22 |
| 24 """Pathologically bad and janky sites on mobile.""" | 23 """Pathologically bad and janky sites on mobile.""" |
| 25 | 24 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 ('http://www.pbs.org/newshour/bb/' | 35 ('http://www.pbs.org/newshour/bb/' |
| 37 'much-really-cost-live-city-like-seattle/#the-rundown'), | 36 'much-really-cost-live-city-like-seattle/#the-rundown'), |
| 38 ('http://www.theguardian.com/politics/2015/mar/09/' | 37 ('http://www.theguardian.com/politics/2015/mar/09/' |
| 39 'ed-balls-tory-spending-plans-nhs-charging'), | 38 'ed-balls-tory-spending-plans-nhs-charging'), |
| 40 'http://www.zdnet.com', | 39 'http://www.zdnet.com', |
| 41 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria', | 40 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria', |
| 42 'https://www.linkedin.com/in/linustorvalds'] | 41 'https://www.linkedin.com/in/linustorvalds'] |
| 43 | 42 |
| 44 for site in sites: | 43 for site in sites: |
| 45 self.AddStory(PathologicalMobileSitesPage(site, self)) | 44 self.AddStory(PathologicalMobileSitesPage(site, self)) |
| OLD | NEW |