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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
6 from telemetry.page.page_set import PageSet | 6 from telemetry.page.page_set import PageSet |
7 from telemetry.page.page import Page | 7 from telemetry.page.page import Page |
8 | 8 |
9 | 9 |
10 class Top2012Q3Page(Page): | 10 class Top2012Q3Page(Page): |
11 | 11 |
12 def __init__(self, url, page_set): | 12 def __init__(self, url, page_set): |
13 super(Top2012Q3Page, self).__init__(url=url, page_set=page_set) | 13 super(Top2012Q3Page, self).__init__(url=url, page_set=page_set) |
14 self.make_javascript_deterministic = True | 14 self.make_javascript_deterministic = True |
15 self.credentials_path = 'data/credentials.json' | 15 self.credentials_path = 'data/credentials.json' |
16 self.archive_data_file = 'data/2012Q3.json' | 16 self.archive_data_file = 'data/2012Q3.json' |
17 | 17 |
18 def ReloadAndGc(self, action_runner): | 18 def ReloadAndGc(self, action_runner): |
19 action_runner.RunAction(ReloadAction()) | 19 action_runner.RunAction(ReloadAction()) |
20 action_runner.RunAction(WaitAction({"seconds": 1})) | 20 action_runner.Wait(1) |
21 action_runner.RunAction(JsCollectGarbageAction()) | 21 action_runner.RunAction(JsCollectGarbageAction()) |
22 | 22 |
23 def RunSmoothness(self, action_runner): | 23 def RunSmoothness(self, action_runner): |
24 action_runner.RunAction(ScrollAction()) | 24 action_runner.RunAction(ScrollAction()) |
25 | 25 |
26 def RunStressMemory(self, action_runner): | 26 def RunStressMemory(self, action_runner): |
27 for _ in xrange(3): | 27 for _ in xrange(3): |
28 self.ReloadAndGc(action_runner) | 28 self.ReloadAndGc(action_runner) |
29 | 29 |
30 | 30 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 'http://www.target.com/c/women/-/N-5xtd3#?lnk=nav_t_spc_1_0', | 268 'http://www.target.com/c/women/-/N-5xtd3#?lnk=nav_t_spc_1_0', |
269 'http://dianxin.cn', | 269 'http://dianxin.cn', |
270 'http://www.aizhan.com/siteall/www.youboy.com/', | 270 'http://www.aizhan.com/siteall/www.youboy.com/', |
271 'http://veiculos-home.mercadolivre.com.br/', | 271 'http://veiculos-home.mercadolivre.com.br/', |
272 'http://kakaku.com', | 272 'http://kakaku.com', |
273 'http://flipkart.com', | 273 'http://flipkart.com', |
274 'http://paipai.com'] | 274 'http://paipai.com'] |
275 | 275 |
276 for url in urls_list: | 276 for url in urls_list: |
277 self.AddPage(Top2012Q3Page(url, self)) | 277 self.AddPage(Top2012Q3Page(url, self)) |
OLD | NEW |