Chromium Code Reviews| Index: tools/perf/page_sets/pathological_mobile_sites.py |
| diff --git a/tools/perf/page_sets/pathological_mobile_sites.py b/tools/perf/page_sets/pathological_mobile_sites.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..38839a6fd281f79338a16ba7c25a6ca8483f389c |
| --- /dev/null |
| +++ b/tools/perf/page_sets/pathological_mobile_sites.py |
| @@ -0,0 +1,43 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from telemetry.page import page as page_module |
| +from telemetry.page import page_set as page_set_module |
| + |
| + |
| +class PathologicalMobileSitesPage(page_module.Page): |
| + |
| + def __init__(self, url, page_set): |
| + super(PathologicalMobileSitesPage, self).__init__( |
| + url=url, page_set=page_set, credentials_path='data/credentials.json') |
| + self.user_agent_type = 'mobile' |
| + self.archive_data_file = 'data/pathological_mobile_sites.json' |
| + |
| + def RunPageInteractions(self, action_runner): |
| + interaction = action_runner.BeginGestureInteraction( |
| + 'ScrollAction', is_smooth=True) |
| + action_runner.ScrollPage() |
| + interaction.End() |
| + |
| + |
| +class PathologicalMobileSitesPageSet(page_set_module.PageSet): |
| + |
| + """Pathologically bad and janky sites on mobile.""" |
| + |
| + def __init__(self): |
| + super(PathologicalMobileSitesPageSet, self).__init__( |
| + user_agent_type='mobile', |
| + archive_data_file='data/pathological_mobile_sites.json', |
| + bucket=page_set_module.INTERNAL_BUCKET) |
| + |
| + sites = ['http://edition.cnn.com', |
| + 'http://m.espn.go.com/nhl/rankings', |
| + 'http://recode.net', |
| + 'http://www.forbes.com', |
| + 'http://www.latimes.com', |
|
picksi1
2015/01/23 14:43:46
gpylint didn't allow me to add a '+' between the t
|
| + 'http://www.pbs.org/newshour/bb/' |
| + 'much-really-cost-live-city-like-seattle/#the-rundown', |
| + 'http://www.zdnet.com'] |
| + |
| + for site in sites: |
| + self.AddUserStory(PathologicalMobileSitesPage(site, self)) |