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
8 class PathologicalMobileSitesPage(page_module
.Page
):
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'
16 def RunPageInteractions(self
, action_runner
):
17 with action_runner
.CreateGestureInteraction('ScrollAction'):
18 action_runner
.ScrollPage()
21 class PathologicalMobileSitesPageSet(page_set_module
.PageSet
):
23 """Pathologically bad and janky sites on mobile."""
26 super(PathologicalMobileSitesPageSet
, self
).__init
__(
27 user_agent_type
='mobile',
28 archive_data_file
='data/pathological_mobile_sites.json',
29 bucket
=page_set_module
.PARTNER_BUCKET
)
31 sites
= ['http://edition.cnn.com',
32 'http://m.espn.go.com/nhl/rankings',
34 'http://sports.yahoo.com/',
35 'http://www.latimes.com',
36 ('http://www.pbs.org/newshour/bb/'
37 'much-really-cost-live-city-like-seattle/#the-rundown'),
38 ('http://www.theguardian.com/politics/2015/mar/09/'
39 'ed-balls-tory-spending-plans-nhs-charging'),
40 'http://www.zdnet.com',
41 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria',
42 'https://www.linkedin.com/in/linustorvalds']
45 self
.AddUserStory(PathologicalMobileSitesPage(site
, self
))