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 | 5 |
6 | 6 |
7 from telemetry.page import page as page_module | 7 from telemetry.page import page as page_module |
8 from telemetry.page import page_set as page_set_module | 8 from telemetry.page import page_set as page_set_module |
9 | 9 |
10 | 10 |
11 class SkiaBuildbotDesktopPage(page_module.Page): | 11 class SkiaBuildbotDesktopPage(page_module.Page): |
12 | 12 |
13 def __init__(self, url, page_set): | 13 def __init__(self, url, page_set): |
14 super(SkiaBuildbotDesktopPage, self).__init__( | 14 super(SkiaBuildbotDesktopPage, self).__init__( |
15 url=url, | 15 url=url, |
16 page_set=page_set, | 16 page_set=page_set, |
17 credentials_path='data/credentials.json') | 17 credentials_path='data/credentials.json') |
18 self.user_agent_type = 'desktop' | 18 self.user_agent_type = 'desktop' |
19 self.archive_data_file = 'data/skia_baidu_desktop.json' | 19 self.archive_data_file = 'data/skia_baidu_desktop.json' |
20 | 20 |
21 def RunSmoothness(self, action_runner): | |
22 action_runner.ScrollElement() | |
23 | |
24 def RunNavigateSteps(self, action_runner): | 21 def RunNavigateSteps(self, action_runner): |
25 action_runner.NavigateToPage(self) | 22 action_runner.NavigateToPage(self) |
26 action_runner.Wait(60) | 23 action_runner.Wait(90) |
27 | 24 |
28 | 25 |
29 class SkiaBaiduDesktopPageSet(page_set_module.PageSet): | 26 class SkiaBaiduDesktopPageSet(page_set_module.PageSet): |
30 | 27 |
31 """ Pages designed to represent the median, not highly optimized web """ | 28 """ Pages designed to represent the median, not highly optimized web """ |
32 | 29 |
33 def __init__(self): | 30 def __init__(self): |
34 super(SkiaBaiduDesktopPageSet, self).__init__( | 31 super(SkiaBaiduDesktopPageSet, self).__init__( |
35 user_agent_type='desktop', | 32 user_agent_type='desktop', |
36 archive_data_file='data/skia_baidu_desktop.json') | 33 archive_data_file='data/skia_baidu_desktop.json') |
37 | 34 |
38 urls_list = [ | 35 urls_list = [ |
39 # Why: #5 (Alexa) most visited worldwide. | 36 # Why: #5 (Alexa) most visited worldwide. |
40 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' | 37 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' |
41 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), | 38 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), |
42 ] | 39 ] |
43 | 40 |
44 for url in urls_list: | 41 for url in urls_list: |
45 self.AddPage(SkiaBuildbotDesktopPage(url, self)) | 42 self.AddPage(SkiaBuildbotDesktopPage(url, self)) |
OLD | NEW |