Chromium Code Reviews| 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 doesn't load in android. | |
|
Sami
2015/03/02 14:03:56
Please move this comment to CanRunOnBrowser
ssid
2015/03/02 20:09:41
Done.
| |
| 102 class GoogleMapsPage(TopPages): | |
| 103 | |
| 104 """ Why: productivity, top google properties; Supports drag gesturee """ | |
| 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 RunNavigateSteps(self, action_runner): | |
| 113 super(GoogleMapsPage, self).RunNavigateSteps(action_runner) | |
| 114 action_runner.WaitForElement(selector='.widget-scene-canvas') | |
| 115 action_runner.WaitForElement(selector='.widget-zoom-in') | |
| 116 action_runner.WaitForElement(selector='.widget-zoom-out') | |
| 117 | |
| 118 def CanRunOnBrowser(self, browser_info): | |
| 119 return (browser_info._browser._platform_backend.platform.GetOSName() != | |
| 120 'android') | |
| 121 | |
| 101 | 122 |
| 102 class GooglePlusPage(TopPages): | 123 class GooglePlusPage(TopPages): |
| 103 | 124 |
| 104 """ Why: social; top google property; Public profile; infinite scrolls """ | 125 """ Why: social; top google property; Public profile; infinite scrolls """ |
| 105 | 126 |
| 106 def __init__(self, page_set): | 127 def __init__(self, page_set): |
| 107 super(GooglePlusPage, self).__init__( | 128 super(GooglePlusPage, self).__init__( |
| 108 url='https://plus.google.com/110031535020051778989/posts', | 129 url='https://plus.google.com/110031535020051778989/posts', |
| 109 page_set=page_set, | 130 page_set=page_set, |
| 110 credentials='google') | 131 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) """ | 271 """ Why: #1 games according to Alexa (with actual games in it) """ |
| 251 | 272 |
| 252 def __init__(self, page_set): | 273 def __init__(self, page_set): |
| 253 super(YahooGamesPage, self).__init__( | 274 super(YahooGamesPage, self).__init__( |
| 254 url='http://games.yahoo.com', | 275 url='http://games.yahoo.com', |
| 255 page_set=page_set) | 276 page_set=page_set) |
| 256 | 277 |
| 257 def RunNavigateSteps(self, action_runner): | 278 def RunNavigateSteps(self, action_runner): |
| 258 super(YahooGamesPage, self).RunNavigateSteps(action_runner) | 279 super(YahooGamesPage, self).RunNavigateSteps(action_runner) |
| 259 action_runner.Wait(2) | 280 action_runner.Wait(2) |
| OLD | NEW |