OLD | NEW |
---|---|
(Empty) | |
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 | |
3 # found in the LICENSE file. | |
4 from telemetry.page import page as page_module | |
5 from telemetry.page import page_set as page_set_module | |
6 | |
7 | |
8 class PathologicalMobileSitesPage(page_module.Page): | |
9 | |
10 def __init__(self, url, page_set): | |
11 super(PathologicalMobileSitesPage, self).__init__( | |
12 url=url, page_set=page_set, credentials_path='data/credentials.json') | |
13 self.user_agent_type = 'mobile' | |
14 self.archive_data_file = 'data/pathological_mobile_sites.json' | |
15 | |
16 def RunPageInteractions(self, action_runner): | |
17 interaction = action_runner.BeginGestureInteraction( | |
18 'ScrollAction', is_smooth=True) | |
19 action_runner.ScrollPage() | |
20 interaction.End() | |
21 | |
22 | |
23 class PathologicalMobileSitesPageSet(page_set_module.PageSet): | |
jdduke (slow)
2015/01/28 17:46:52
Do we want to add this as a smoothness test?
picksi
2015/02/10 18:10:46
Not sure what you want here. Do I need to add some
jdduke (slow)
2015/02/10 18:17:06
Sorry, I meant add it to the smoothness suite of t
| |
24 | |
25 """Pathologically bad and janky sites on mobile.""" | |
26 | |
27 def __init__(self): | |
28 super(PathologicalMobileSitesPageSet, self).__init__( | |
29 user_agent_type='mobile', | |
30 archive_data_file='data/pathological_mobile_sites.json', | |
31 bucket=page_set_module.INTERNAL_BUCKET) | |
32 | |
33 sites = ['http://edition.cnn.com', | |
34 'http://m.espn.go.com/nhl/rankings', | |
35 'http://recode.net', | |
36 'http://www.forbes.com', | |
37 'http://www.latimes.com', | |
38 'http://www.pbs.org/newshour/bb/' | |
39 'much-really-cost-live-city-like-seattle/#the-rundown', | |
Sami
2015/01/27 15:30:37
Please indent this line or use braces to make it m
picksi
2015/02/10 18:10:46
Done.
| |
40 'http://www.zdnet.com'] | |
41 | |
42 for site in sites: | |
43 self.AddUserStory(PathologicalMobileSitesPage(site, self)) | |
OLD | NEW |