[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / perf / page_sets / key_mobile_sites.py
blobe74b22a8e285cdd8c3879a95291f919b4bd0cf35
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 shared_page_state
6 from telemetry import story
8 from page_sets import key_mobile_sites_pages
11 class KeyMobileSitesPage(page_module.Page):
13 def __init__(self, url, page_set, name='', labels=None,
14 action_on_load_complete=False):
15 super(KeyMobileSitesPage, self).__init__(
16 url=url, page_set=page_set, name=name,
17 shared_page_state_class=shared_page_state.SharedMobilePageState,
18 credentials_path='data/credentials.json', labels=labels)
19 self.archive_data_file = 'data/key_mobile_sites.json'
20 self.action_on_load_complete = action_on_load_complete
23 class KeyMobileSitesPageSet(story.StorySet):
25 """ Key mobile sites with smooth interactions. """
27 def __init__(self):
28 super(KeyMobileSitesPageSet, self).__init__(
29 archive_data_file='data/key_mobile_sites.json',
30 cloud_storage_bucket=story.PARTNER_BUCKET)
33 # Add pages with predefined classes that contain custom navigation logic.
34 predefined_page_classes = [
35 key_mobile_sites_pages.CapitolVolkswagenPage,
36 key_mobile_sites_pages.TheVergeArticlePage,
37 key_mobile_sites_pages.CnnArticlePage,
38 key_mobile_sites_pages.FacebookPage,
39 key_mobile_sites_pages.YoutubeMobilePage,
40 key_mobile_sites_pages.LinkedInPage,
41 key_mobile_sites_pages.YahooAnswersPage,
42 key_mobile_sites_pages.GoogleNewsMobilePage,
43 key_mobile_sites_pages.GoogleNewsMobile2Page,
44 key_mobile_sites_pages.AmazonNicolasCagePage,
46 for page_class in predefined_page_classes:
47 self.AddStory(page_class(self))
49 # Add pages with custom page interaction logic.
51 # Page behaves non-deterministically, replaced with test version for now.
52 # self.AddStory(GroupClonedPage(self))
53 # mean_input_event_latency cannot be tracked correctly for
54 # GroupClonedListImagesPage.
55 # See crbug.com/409086.
56 # self.AddStory(GroupClonedListImagesPage(self))
58 # Add pages with custom labels.
60 # Why: Top news site.
61 self.AddStory(KeyMobileSitesPage(
62 url='http://nytimes.com/', page_set=self, labels=['fastpath']))
64 # Why: Image-heavy site.
65 self.AddStory(KeyMobileSitesPage(
66 url='http://cuteoverload.com', page_set=self, labels=['fastpath']))
68 # Why: #11 (Alexa global), google property; some blogger layouts
69 # have infinite scroll but more interesting.
70 self.AddStory(KeyMobileSitesPage(
71 url='http://googlewebmastercentral.blogspot.com/',
72 page_set=self, name='Blogger'))
74 # Why: #18 (Alexa global), Picked an interesting post """
75 self.AddStory(KeyMobileSitesPage(
76 # pylint: disable=line-too-long
77 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/',
78 page_set=self,
79 name='Wordpress'))
81 # Why: #6 (Alexa) most visited worldwide, picked an interesting page
82 self.AddStory(KeyMobileSitesPage(
83 url='http://en.wikipedia.org/wiki/Wikipedia',
84 page_set=self,
85 name='Wikipedia (1 tab)'))
87 # Why: Wikipedia page with a delayed scroll start
88 self.AddStory(KeyMobileSitesPage(
89 url='http://en.wikipedia.org/wiki/Wikipedia',
90 page_set=self,
91 name='Wikipedia (1 tab) - delayed scroll start',
92 action_on_load_complete=True))
94 # Why: #8 (Alexa global), picked an interesting page
95 # Forbidden (Rate Limit Exceeded)
96 # self.AddStory(KeyMobileSitesPage(
97 # url='http://twitter.com/katyperry', page_set=self, name='Twitter'))
99 # Why: #37 (Alexa global) """
100 self.AddStory(KeyMobileSitesPage(
101 url='http://pinterest.com',
102 page_set=self,
103 name='Pinterest'))
105 # Why: #1 sports.
106 # Fails often; crbug.com/249722'
107 # self.AddStory(KeyMobileSitesPage(
108 # url='http://espn.go.com', page_set=self, name='ESPN'))
109 # Why: crbug.com/231413
110 # Doesn't scroll; crbug.com/249736
111 # self.AddStory(KeyMobileSitesPage(
112 # url='http://forecast.io', page_set=self))
113 # Why: crbug.com/169827
114 self.AddStory(KeyMobileSitesPage(
115 url='http://slashdot.org/', page_set=self, labels=['fastpath']))
117 # Why: #5 Alexa news """
119 self.AddStory(KeyMobileSitesPage(
120 url='http://www.reddit.com/r/programming/comments/1g96ve',
121 page_set=self, labels=['fastpath']))
123 # Why: Problematic use of fixed position elements """
124 self.AddStory(KeyMobileSitesPage(
125 url='http://www.boingboing.net', page_set=self, labels=['fastpath']))
127 # Add simple pages with no custom navigation logic or labels.
128 urls_list = [
129 # Why: Social; top Google property; Public profile; infinite scrolls.
130 # pylint: disable=line-too-long
131 'https://plus.google.com/app/basic/110031535020051778989/posts?source=apppromo',
132 # Why: crbug.com/242544
133 ('http://www.androidpolice.com/2012/10/03/rumor-evidence-mounts-that-an-'
134 'lg-optimus-g-nexus-is-coming-along-with-a-nexus-phone-certification-'
135 'program/'),
136 # Why: crbug.com/149958
137 'http://gsp.ro',
138 # Why: Top tech blog
139 'http://theverge.com',
140 # Why: Top tech site
141 'http://digg.com',
142 # Why: Top Google property; a Google tab is often open
143 'https://www.google.com/#hl=en&q=barack+obama',
144 # Why: #1 news worldwide (Alexa global)
145 'http://news.yahoo.com',
146 # Why: #2 news worldwide
147 'http://www.cnn.com',
148 # Why: #1 commerce website by time spent by users in US
149 'http://shop.mobileweb.ebay.com/searchresults?kw=viking+helmet',
150 # Why: #1 Alexa recreation
151 # pylint: disable=line-too-long
152 'http://www.booking.com/searchresults.html?src=searchresults&latitude=65.0500&longitude=25.4667',
153 # Why: #1 Alexa sports
154 'http://sports.yahoo.com/',
155 # Why: Top tech blog
156 'http://techcrunch.com',
157 # Why: #6 Alexa sports
158 'http://mlb.com/',
159 # Why: #14 Alexa California
160 'http://www.sfgate.com/',
161 # Why: Non-latin character set
162 'http://worldjournal.com/',
163 # Why: Mobile wiki
164 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria',
165 # Why: #15 Alexa news
166 'http://online.wsj.com/home-page',
167 # Why: Image-heavy mobile site
168 'http://www.deviantart.com/',
169 # Why: Top search engine
170 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&'
171 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'),
172 # Why: Top search engine
173 'http://www.bing.com/search?q=sloths',
174 # Why: Good example of poor initial scrolling
175 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans'
178 for url in urls_list:
179 self.AddStory(KeyMobileSitesPage(url, self))