OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry.page import shared_page_state | 5 from telemetry.page import shared_page_state |
6 | 6 |
7 | 7 |
8 class TopPages(page_module.Page): | 8 class TopPages(page_module.Page): |
9 | 9 |
10 def __init__(self, url, page_set, shared_page_state_class, | 10 def __init__(self, url, page_set, shared_page_state_class, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 action_runner.Wait(1) | 90 action_runner.Wait(1) |
91 | 91 |
92 | 92 |
93 class GoogleDocPage(TopPages): | 93 class GoogleDocPage(TopPages): |
94 | 94 |
95 """ Why: productivity, top google properties; Sample doc in the link """ | 95 """ Why: productivity, top google properties; Sample doc in the link """ |
96 | 96 |
97 def __init__(self, page_set, | 97 def __init__(self, page_set, |
98 shared_page_state_class=shared_page_state.SharedPageState): | 98 shared_page_state_class=shared_page_state.SharedPageState): |
99 super(GoogleDocPage, self).__init__( | 99 super(GoogleDocPage, self).__init__( |
100 # pylint: disable=C0301 | 100 # pylint: disable=line-too-long |
101 url='https://docs.google.com/document/d/1X-IKNjtEnx-WW5JIKRLsyhz5sbsat3m
fTpAPUSX3_s4/view', | 101 url='https://docs.google.com/document/d/1X-IKNjtEnx-WW5JIKRLsyhz5sbsat3m
fTpAPUSX3_s4/view', |
102 page_set=page_set, | 102 page_set=page_set, |
103 name='Docs (1 open document tab)', | 103 name='Docs (1 open document tab)', |
104 credentials='google', | 104 credentials='google', |
105 shared_page_state_class=shared_page_state_class) | 105 shared_page_state_class=shared_page_state_class) |
106 | 106 |
107 def RunNavigateSteps(self, action_runner): | 107 def RunNavigateSteps(self, action_runner): |
108 super(GoogleDocPage, self).RunNavigateSteps(action_runner) | 108 super(GoogleDocPage, self).RunNavigateSteps(action_runner) |
109 action_runner.Wait(2) | 109 action_runner.Wait(2) |
110 action_runner.WaitForJavaScriptCondition( | 110 action_runner.WaitForJavaScriptCondition( |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 action_runner.WaitForElement(text='accessibility') | 162 action_runner.WaitForElement(text='accessibility') |
163 | 163 |
164 | 164 |
165 class WordpressPage(TopPages): | 165 class WordpressPage(TopPages): |
166 | 166 |
167 """ Why: #18 (Alexa global), Picked an interesting post """ | 167 """ Why: #18 (Alexa global), Picked an interesting post """ |
168 | 168 |
169 def __init__(self, page_set, | 169 def __init__(self, page_set, |
170 shared_page_state_class=shared_page_state.SharedPageState): | 170 shared_page_state_class=shared_page_state.SharedPageState): |
171 super(WordpressPage, self).__init__( | 171 super(WordpressPage, self).__init__( |
172 # pylint: disable=C0301 | 172 # pylint: disable=line-too-long |
173 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-pic
ks-for-august-2012/', | 173 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-pic
ks-for-august-2012/', |
174 page_set=page_set, | 174 page_set=page_set, |
175 name='Wordpress', | 175 name='Wordpress', |
176 shared_page_state_class=shared_page_state_class) | 176 shared_page_state_class=shared_page_state_class) |
177 | 177 |
178 def RunNavigateSteps(self, action_runner): | 178 def RunNavigateSteps(self, action_runner): |
179 super(WordpressPage, self).RunNavigateSteps(action_runner) | 179 super(WordpressPage, self).RunNavigateSteps(action_runner) |
180 action_runner.WaitForElement( | 180 action_runner.WaitForElement( |
181 # pylint: disable=C0301 | 181 # pylint: disable=line-too-long |
182 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sig
ht/"]') | 182 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sig
ht/"]') |
183 | 183 |
184 | 184 |
185 class FacebookPage(TopPages): | 185 class FacebookPage(TopPages): |
186 | 186 |
187 """ Why: top social,Public profile """ | 187 """ Why: top social,Public profile """ |
188 | 188 |
189 def __init__(self, page_set, | 189 def __init__(self, page_set, |
190 shared_page_state_class=shared_page_state.SharedPageState): | 190 shared_page_state_class=shared_page_state.SharedPageState): |
191 super(FacebookPage, self).__init__( | 191 super(FacebookPage, self).__init__( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 def __init__(self, page_set, | 286 def __init__(self, page_set, |
287 shared_page_state_class=shared_page_state.SharedPageState): | 287 shared_page_state_class=shared_page_state.SharedPageState): |
288 super(YahooGamesPage, self).__init__( | 288 super(YahooGamesPage, self).__init__( |
289 url='http://games.yahoo.com', | 289 url='http://games.yahoo.com', |
290 page_set=page_set, | 290 page_set=page_set, |
291 shared_page_state_class=shared_page_state_class) | 291 shared_page_state_class=shared_page_state_class) |
292 | 292 |
293 def RunNavigateSteps(self, action_runner): | 293 def RunNavigateSteps(self, action_runner): |
294 super(YahooGamesPage, self).RunNavigateSteps(action_runner) | 294 super(YahooGamesPage, self).RunNavigateSteps(action_runner) |
295 action_runner.Wait(2) | 295 action_runner.Wait(2) |
OLD | NEW |