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
3 # found in the LICENSE file.
4 from telemetry
.page
import page
as page_module
5 from telemetry
.page
import shared_page_state
6 from telemetry
import story
9 class Typical25Page(page_module
.Page
):
11 def __init__(self
, url
, page_set
, run_no_page_interactions
):
12 super(Typical25Page
, self
).__init
__(
13 url
=url
, page_set
=page_set
,
14 shared_page_state_class
=shared_page_state
.SharedDesktopPageState
)
15 self
.archive_data_file
= 'data/typical_25.json'
16 self
._run
_no
_page
_interactions
= run_no_page_interactions
18 def RunPageInteractions(self
, action_runner
):
19 if self
._run
_no
_page
_interactions
:
21 with action_runner
.CreateGestureInteraction('ScrollAction'):
22 action_runner
.ScrollPage()
25 class Typical25PageSet(story
.StorySet
):
27 """ Pages designed to represent the median, not highly optimized web """
29 def __init__(self
, run_no_page_interactions
=False):
30 super(Typical25PageSet
, self
).__init
__(
31 archive_data_file
='data/typical_25.json',
32 cloud_storage_bucket
=story
.PARTNER_BUCKET
)
35 # Why: Alexa games #48
36 'http://www.nick.com/games',
37 # Why: Alexa sports #45
38 'http://www.rei.com/',
39 # Why: Alexa sports #50
40 'http://www.fifa.com/',
41 # Why: Alexa shopping #41
42 'http://www.gamestop.com/ps3',
43 # Why: Alexa shopping #25
44 'http://www.barnesandnoble.com/u/books-bestselling-books/379003057/',
46 ('http://www.economist.com/news/science-and-technology/21573529-small-'
47 'models-cosmic-phenomena-are-shedding-light-real-thing-how-build'),
49 'http://www.theonion.com',
50 'http://arstechnica.com/',
52 'http://allrecipes.com/Recipe/Pull-Apart-Hot-Cross-Buns/Detail.aspx',
53 'http://www.html5rocks.com/en/',
54 'http://www.mlb.com/',
55 # pylint: disable=C0301
56 'http://gawker.com/5939683/based-on-a-true-story-is-a-rotten-lie-i-hope-you-never-believe',
57 'http://www.imdb.com/title/tt0910970/',
58 'http://www.flickr.com/search/?q=monkeys&f=hp',
59 'http://money.cnn.com/',
60 'http://www.nationalgeographic.com/',
61 'http://premierleague.com',
62 'http://www.osubeavers.com/',
63 'http://walgreens.com',
64 'http://colorado.edu',
65 ('http://www.ticketmaster.com/JAY-Z-and-Justin-Timberlake-tickets/artist/'
66 '1837448?brand=none&tm_link=tm_homeA_rc_name2'),
67 # pylint: disable=C0301
68 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-in-the-world',
69 'http://www.airbnb.com/',
70 'http://www.ign.com/',
71 # Why: Alexa health #25
77 Typical25Page(url
, self
, run_no_page_interactions
))