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 | 4 |
5 from telemetry.page import page_set | 5 from telemetry.page import page_set |
6 from telemetry.page import page | 6 from telemetry.page import page |
7 | 7 |
8 | 8 |
9 TOP_2013_URLS = [ | 9 TOP_2013_URLS = [ |
10 'http://www.facebook.com/barackobama', | 10 'http://www.facebook.com/barackobama', |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 'http://flipkart.com', | 245 'http://flipkart.com', |
246 'http://paipai.com' | 246 'http://paipai.com' |
247 ] | 247 ] |
248 | 248 |
249 | 249 |
250 class Top2012Q3Page(page.Page): | 250 class Top2012Q3Page(page.Page): |
251 | 251 |
252 def __init__(self, url, ps): | 252 def __init__(self, url, ps): |
253 super(Top2012Q3Page, self).__init__( | 253 super(Top2012Q3Page, self).__init__( |
254 url=url, page_set=ps, credentials_path = 'data/credentials.json') | 254 url=url, page_set=ps, credentials_path = 'data/credentials.json') |
255 self.make_javascript_deterministic = True | |
256 self.archive_data_file = 'data/2012Q3.json' | 255 self.archive_data_file = 'data/2012Q3.json' |
257 | 256 |
258 def RunSmoothness(self, action_runner): | 257 def RunSmoothness(self, action_runner): |
259 interaction = action_runner.BeginGestureInteraction( | 258 interaction = action_runner.BeginGestureInteraction( |
260 'ScrollAction', is_smooth=True) | 259 'ScrollAction', is_smooth=True) |
261 action_runner.ScrollPage() | 260 action_runner.ScrollPage() |
262 interaction.End() | 261 interaction.End() |
263 | 262 |
264 | 263 |
265 class Top2012Q3PageSet(page_set.PageSet): | 264 class Top2012Q3PageSet(page_set.PageSet): |
266 """ Pages hand-picked from top-lists in Q32012. """ | 265 """ Pages hand-picked from top-lists in Q32012. """ |
267 | 266 |
268 def __init__(self): | 267 def __init__(self): |
269 super(Top2012Q3PageSet, self).__init__( | 268 super(Top2012Q3PageSet, self).__init__( |
270 make_javascript_deterministic=True, | |
271 archive_data_file='data/2012Q3.json', | 269 archive_data_file='data/2012Q3.json', |
272 bucket=page_set.PARTNER_BUCKET) | 270 bucket=page_set.PARTNER_BUCKET) |
273 | 271 |
274 | 272 |
275 for url in TOP_2013_URLS: | 273 for url in TOP_2013_URLS: |
276 self.AddUserStory(Top2012Q3Page(url, self)) | 274 self.AddUserStory(Top2012Q3Page(url, self)) |
OLD | NEW |