| 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 KeyMobileSitesPage(page_module.Page): | 8 class KeyMobileSitesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set, name='', tags=None): | 10 def __init__(self, url, page_set, name='', tags=None): |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 # pylint: disable=line-too-long | 128 # pylint: disable=line-too-long |
| 129 url='http://answers.yahoo.com/question/index?qid=20110117024343AAopj8f', | 129 url='http://answers.yahoo.com/question/index?qid=20110117024343AAopj8f', |
| 130 page_set=page_set) | 130 page_set=page_set) |
| 131 | 131 |
| 132 def RunNavigateSteps(self, action_runner): | 132 def RunNavigateSteps(self, action_runner): |
| 133 super(YahooAnswersPage, self).RunNavigateSteps(action_runner) | 133 super(YahooAnswersPage, self).RunNavigateSteps(action_runner) |
| 134 action_runner.WaitForElement(text='Other Answers (1 - 20 of 149)') | 134 action_runner.WaitForElement(text='Other Answers (1 - 20 of 149)') |
| 135 action_runner.ClickElement(text='Other Answers (1 - 20 of 149)') | 135 action_runner.ClickElement(text='Other Answers (1 - 20 of 149)') |
| 136 | 136 |
| 137 | 137 |
| 138 class GmailPage(KeyMobileSitesPage): | |
| 139 | |
| 140 """ Why: productivity, top google properties """ | |
| 141 | |
| 142 def __init__(self, page_set): | |
| 143 super(GmailPage, self).__init__( | |
| 144 url='https://mail.google.com/mail/', | |
| 145 page_set=page_set) | |
| 146 | |
| 147 self.credentials = 'google' | |
| 148 | |
| 149 def RunNavigateSteps(self, action_runner): | |
| 150 super(GmailPage, self).RunNavigateSteps(action_runner) | |
| 151 action_runner.WaitForJavaScriptCondition( | |
| 152 'document.getElementById("og_user_warning") !== null') | |
| 153 action_runner.WaitForJavaScriptCondition( | |
| 154 'document.getElementById("og_user_warning") === null') | |
| 155 | |
| 156 | |
| 157 class GroupClonedPage(KeyMobileSitesPage): | 138 class GroupClonedPage(KeyMobileSitesPage): |
| 158 | 139 |
| 159 """ Why: crbug.com/172906 """ | 140 """ Why: crbug.com/172906 """ |
| 160 | 141 |
| 161 def __init__(self, page_set): | 142 def __init__(self, page_set): |
| 162 super(GroupClonedPage, self).__init__( | 143 super(GroupClonedPage, self).__init__( |
| 163 url='http://groupcloned.com', | 144 url='http://groupcloned.com', |
| 164 page_set=page_set) | 145 page_set=page_set) |
| 165 | 146 |
| 166 | 147 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 class AmazonNicolasCagePage(KeyMobileSitesPage): | 209 class AmazonNicolasCagePage(KeyMobileSitesPage): |
| 229 | 210 |
| 230 """ | 211 """ |
| 231 Why: #1 world commerce website by visits; #3 commerce in the US by time spent | 212 Why: #1 world commerce website by visits; #3 commerce in the US by time spent |
| 232 """ | 213 """ |
| 233 | 214 |
| 234 def __init__(self, page_set): | 215 def __init__(self, page_set): |
| 235 super(AmazonNicolasCagePage, self).__init__( | 216 super(AmazonNicolasCagePage, self).__init__( |
| 236 url='http://www.amazon.com/gp/aw/s/ref=is_box_?k=nicolas+cage', | 217 url='http://www.amazon.com/gp/aw/s/ref=is_box_?k=nicolas+cage', |
| 237 page_set=page_set) | 218 page_set=page_set) |
| OLD | NEW |