| 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_set | 4 from telemetry.page import page_set |
| 5 from telemetry.page import page | 5 from telemetry.page import page |
| 6 | 6 |
| 7 | 7 |
| 8 class Top2012Q3Page(page.Page): | 8 class Top2012Q3Page(page.Page): |
| 9 | 9 |
| 10 def __init__(self, url, ps): | 10 def __init__(self, url, ps): |
| 11 super(Top2012Q3Page, self).__init__(url=url, page_set=ps) | 11 super(Top2012Q3Page, self).__init__(url=url, page_set=ps) |
| 12 self.make_javascript_deterministic = True | 12 self.make_javascript_deterministic = True |
| 13 self.credentials_path = 'data/credentials.json' | 13 self.credentials_path = 'data/credentials.json' |
| 14 self.archive_data_file = 'data/2012Q3.json' | 14 self.archive_data_file = 'data/2012Q3.json' |
| 15 | 15 |
| 16 def ReloadAndGc(self, action_runner): | 16 def ReloadAndGc(self, action_runner): |
| 17 action_runner.ReloadPage() | 17 action_runner.ReloadPage() |
| 18 action_runner.Wait(1) | 18 action_runner.Wait(1) |
| 19 action_runner.ForceGarbageCollection() | 19 action_runner.ForceGarbageCollection() |
| 20 | 20 |
| 21 def RunSmoothness(self, action_runner): | 21 def RunSmoothness(self, action_runner): |
| 22 interaction = action_runner.BeginGestureInteraction( | 22 interaction = action_runner.BeginGestureInteraction( |
| 23 'ScrollAction', is_smooth=True) | 23 'ScrollAction', is_smooth=True) |
| 24 action_runner.ScrollPage() | 24 action_runner.ScrollPage() |
| 25 interaction.End() | 25 interaction.End() |
| 26 | 26 |
| 27 def RunStressMemory(self, action_runner): | 27 def RunPageInteractions(self, action_runner): |
| 28 for _ in xrange(3): | 28 for _ in xrange(3): |
| 29 self.ReloadAndGc(action_runner) | 29 self.ReloadAndGc(action_runner) |
| 30 | 30 |
| 31 | 31 |
| 32 class Top2012Q3PageSet(page_set.PageSet): | 32 class Top2012Q3PageSet(page_set.PageSet): |
| 33 """ Pages hand-picked from top-lists in Q32012. """ | 33 """ Pages hand-picked from top-lists in Q32012. """ |
| 34 | 34 |
| 35 def __init__(self): | 35 def __init__(self): |
| 36 super(Top2012Q3PageSet, self).__init__( | 36 super(Top2012Q3PageSet, self).__init__( |
| 37 make_javascript_deterministic=True, | 37 make_javascript_deterministic=True, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 'http://www.target.com/c/women/-/N-5xtd3#?lnk=nav_t_spc_1_0', | 270 'http://www.target.com/c/women/-/N-5xtd3#?lnk=nav_t_spc_1_0', |
| 271 'http://dianxin.cn', | 271 'http://dianxin.cn', |
| 272 'http://www.aizhan.com/siteall/www.youboy.com/', | 272 'http://www.aizhan.com/siteall/www.youboy.com/', |
| 273 'http://veiculos-home.mercadolivre.com.br/', | 273 'http://veiculos-home.mercadolivre.com.br/', |
| 274 'http://kakaku.com', | 274 'http://kakaku.com', |
| 275 'http://flipkart.com', | 275 'http://flipkart.com', |
| 276 'http://paipai.com'] | 276 'http://paipai.com'] |
| 277 | 277 |
| 278 for url in urls_list: | 278 for url in urls_list: |
| 279 self.AddPage(Top2012Q3Page(url, self)) | 279 self.AddPage(Top2012Q3Page(url, self)) |
| OLD | NEW |