| 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 page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
| 6 | 6 |
| 7 | 7 |
| 8 class ToughPinchZoomCasesPage(page_module.Page): | 8 class ToughPinchZoomCasesPage(page_module.Page): |
| 9 | 9 |
| 10 def __init__(self, url, page_set, name=''): | 10 def __init__(self, url, page_set, name=''): |
| 11 super(ToughPinchZoomCasesPage, self).__init__(url=url, page_set=page_set, | 11 super(ToughPinchZoomCasesPage, self).__init__( |
| 12 name=name) | 12 url=url, page_set=page_set, name=name, |
| 13 self.credentials_path = 'data/credentials.json' | 13 credentials_path = 'data/credentials.json') |
| 14 self.user_agent_type = 'desktop' | 14 self.user_agent_type = 'desktop' |
| 15 self.archive_data_file = 'data/tough_pinch_zoom_cases.json' | 15 self.archive_data_file = 'data/tough_pinch_zoom_cases.json' |
| 16 | 16 |
| 17 def RunSmoothness(self, action_runner): | 17 def RunSmoothness(self, action_runner): |
| 18 interaction = action_runner.BeginGestureInteraction( | 18 interaction = action_runner.BeginGestureInteraction( |
| 19 'PinchAction', is_smooth=True) | 19 'PinchAction', is_smooth=True) |
| 20 action_runner.PinchPage() | 20 action_runner.PinchPage() |
| 21 interaction.End() | 21 interaction.End() |
| 22 | 22 |
| 23 | 23 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 action_runner.PinchElement(selector='#ya-content-apps') | 239 action_runner.PinchElement(selector='#ya-content-apps') |
| 240 interaction.End() | 240 interaction.End() |
| 241 | 241 |
| 242 | 242 |
| 243 class ToughPinchZoomCasesPageSet(page_set_module.PageSet): | 243 class ToughPinchZoomCasesPageSet(page_set_module.PageSet): |
| 244 | 244 |
| 245 """ Set of pages that are tricky to pinch-zoom """ | 245 """ Set of pages that are tricky to pinch-zoom """ |
| 246 | 246 |
| 247 def __init__(self): | 247 def __init__(self): |
| 248 super(ToughPinchZoomCasesPageSet, self).__init__( | 248 super(ToughPinchZoomCasesPageSet, self).__init__( |
| 249 credentials_path='data/credentials.json', | |
| 250 user_agent_type='desktop', | 249 user_agent_type='desktop', |
| 251 archive_data_file='data/tough_pinch_zoom_cases.json', | 250 archive_data_file='data/tough_pinch_zoom_cases.json', |
| 252 bucket=page_set_module.PARTNER_BUCKET) | 251 bucket=page_set_module.PARTNER_BUCKET) |
| 253 | 252 |
| 254 self.AddPage(GoogleSearchPage(self)) | 253 self.AddPage(GoogleSearchPage(self)) |
| 255 self.AddPage(GmailPage(self)) | 254 self.AddPage(GmailPage(self)) |
| 256 self.AddPage(GoogleCalendarPage(self)) | 255 self.AddPage(GoogleCalendarPage(self)) |
| 257 self.AddPage(GoogleImageSearchPage(self)) | 256 self.AddPage(GoogleImageSearchPage(self)) |
| 258 self.AddPage(GooglePlusPage(self)) | 257 self.AddPage(GooglePlusPage(self)) |
| 259 self.AddPage(YoutubePage(self)) | 258 self.AddPage(YoutubePage(self)) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 281 | 280 |
| 282 self.AddPage(YahooGamePage(self)) | 281 self.AddPage(YahooGamePage(self)) |
| 283 | 282 |
| 284 # Why: #1 Alexa recreation | 283 # Why: #1 Alexa recreation |
| 285 self.AddPage(ToughPinchZoomCasesPage('http://booking.com', self)) | 284 self.AddPage(ToughPinchZoomCasesPage('http://booking.com', self)) |
| 286 | 285 |
| 287 self.AddPage(YahooAnswersPage(self)) | 286 self.AddPage(YahooAnswersPage(self)) |
| 288 | 287 |
| 289 # Why: #1 Alexa sports | 288 # Why: #1 Alexa sports |
| 290 self.AddPage(ToughPinchZoomCasesPage('http://sports.yahoo.com/', self)) | 289 self.AddPage(ToughPinchZoomCasesPage('http://sports.yahoo.com/', self)) |
| OLD | NEW |