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=''): |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 self.credentials = 'google' | 99 self.credentials = 'google' |
100 | 100 |
101 def RunNavigateSteps(self, action_runner): | 101 def RunNavigateSteps(self, action_runner): |
102 action_runner.NavigateToPage(self) | 102 action_runner.NavigateToPage(self) |
103 action_runner.WaitForElement(text='Home') | 103 action_runner.WaitForElement(text='Home') |
104 | 104 |
105 def RunSmoothness(self, action_runner): | 105 def RunSmoothness(self, action_runner): |
106 interaction = action_runner.BeginGestureInteraction( | 106 interaction = action_runner.BeginGestureInteraction( |
107 'PinchAction', is_smooth=True) | 107 'PinchAction', is_smooth=True) |
108 action_runner.PinchElement(selector='#110031535020051778989-tab-bar') | 108 action_runner.PinchElement(selector='[id="110031535020051778989-tab-bar"]') |
109 interaction.End() | 109 interaction.End() |
110 | 110 |
111 | 111 |
112 class YoutubePage(ToughPinchZoomCasesPage): | 112 class YoutubePage(ToughPinchZoomCasesPage): |
113 | 113 |
114 """ Why: #3 (Alexa global) """ | 114 """ Why: #3 (Alexa global) """ |
115 | 115 |
116 def __init__(self, page_set): | 116 def __init__(self, page_set): |
117 super(YoutubePage, self).__init__( | 117 super(YoutubePage, self).__init__( |
118 url='http://www.youtube.com', | 118 url='http://www.youtube.com', |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 self.AddPage(YahooGamePage(self)) | 282 self.AddPage(YahooGamePage(self)) |
283 | 283 |
284 # Why: #1 Alexa recreation | 284 # Why: #1 Alexa recreation |
285 self.AddPage(ToughPinchZoomCasesPage('http://booking.com', self)) | 285 self.AddPage(ToughPinchZoomCasesPage('http://booking.com', self)) |
286 | 286 |
287 self.AddPage(YahooAnswersPage(self)) | 287 self.AddPage(YahooAnswersPage(self)) |
288 | 288 |
289 # Why: #1 Alexa sports | 289 # Why: #1 Alexa sports |
290 self.AddPage(ToughPinchZoomCasesPage('http://sports.yahoo.com/', self)) | 290 self.AddPage(ToughPinchZoomCasesPage('http://sports.yahoo.com/', self)) |
OLD | NEW |