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 | 5 |
6 | 6 |
7 class TopPages(page_module.Page): | 7 class TopPages(page_module.Page): |
8 | 8 |
9 def __init__(self, url, page_set, name='', credentials=None): | 9 def __init__(self, url, page_set, name='', credentials=None): |
10 super(TopPages, self).__init__( | 10 super(TopPages, self).__init__( |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 page_set=page_set, | 91 page_set=page_set, |
92 name='Docs (1 open document tab)', | 92 name='Docs (1 open document tab)', |
93 credentials='google') | 93 credentials='google') |
94 | 94 |
95 def RunNavigateSteps(self, action_runner): | 95 def RunNavigateSteps(self, action_runner): |
96 super(GoogleDocPage, self).RunNavigateSteps(action_runner) | 96 super(GoogleDocPage, self).RunNavigateSteps(action_runner) |
97 action_runner.Wait(2) | 97 action_runner.Wait(2) |
98 action_runner.WaitForJavaScriptCondition( | 98 action_runner.WaitForJavaScriptCondition( |
99 'document.getElementsByClassName("kix-appview-editor").length') | 99 'document.getElementsByClassName("kix-appview-editor").length') |
100 | 100 |
101 # Disabled on android since the desktop record of maps don't load in android. | |
Sami
2015/02/27 15:33:06
nit: s/don't/doesn't/
ssid
2015/03/02 12:03:27
Done.
| |
102 class GoogleMapsPage(TopPages): | |
103 | |
104 """ Why: productivity, top google properties; drag and drop anywhere """ | |
Sami
2015/02/27 15:33:06
Same question about the last part of this.
ssid
2015/03/02 12:03:28
Done.
| |
105 | |
106 def __init__(self, page_set): | |
107 super(GoogleMapsPage, self).__init__( | |
108 url='https://www.google.co.uk/maps/@51.5043968,-0.1526806', | |
109 page_set=page_set, | |
110 name='Maps') | |
111 | |
112 def CanRunOnBrowser(self, browser_info): | |
113 if (browser_info._browser._platform_backend.platform.GetOSName() == | |
Sami
2015/02/27 15:33:06
nit: this could be shortened to return ... GetOSNa
ssid
2015/03/02 12:03:28
Done.
| |
114 'android'): | |
115 return False | |
116 return True; | |
117 | |
101 | 118 |
102 class GooglePlusPage(TopPages): | 119 class GooglePlusPage(TopPages): |
103 | 120 |
104 """ Why: social; top google property; Public profile; infinite scrolls """ | 121 """ Why: social; top google property; Public profile; infinite scrolls """ |
105 | 122 |
106 def __init__(self, page_set): | 123 def __init__(self, page_set): |
107 super(GooglePlusPage, self).__init__( | 124 super(GooglePlusPage, self).__init__( |
108 url='https://plus.google.com/110031535020051778989/posts', | 125 url='https://plus.google.com/110031535020051778989/posts', |
109 page_set=page_set, | 126 page_set=page_set, |
110 credentials='google') | 127 credentials='google') |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 """ Why: #1 games according to Alexa (with actual games in it) """ | 267 """ Why: #1 games according to Alexa (with actual games in it) """ |
251 | 268 |
252 def __init__(self, page_set): | 269 def __init__(self, page_set): |
253 super(YahooGamesPage, self).__init__( | 270 super(YahooGamesPage, self).__init__( |
254 url='http://games.yahoo.com', | 271 url='http://games.yahoo.com', |
255 page_set=page_set) | 272 page_set=page_set) |
256 | 273 |
257 def RunNavigateSteps(self, action_runner): | 274 def RunNavigateSteps(self, action_runner): |
258 super(YahooGamesPage, self).RunNavigateSteps(action_runner) | 275 super(YahooGamesPage, self).RunNavigateSteps(action_runner) |
259 action_runner.Wait(2) | 276 action_runner.Wait(2) |
OLD | NEW |