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 import story |
| 5 from telemetry.page import page as page_module |
4 from telemetry.page import shared_page_state | 6 from telemetry.page import shared_page_state |
5 from telemetry.page import page as page_module | |
6 from telemetry.page import page_set as page_set_module | |
7 | 7 |
8 | 8 |
9 class Typical25Page(page_module.Page): | 9 class Typical25Page(page_module.Page): |
10 | 10 |
11 def __init__(self, url, page_set, run_no_page_interactions): | 11 def __init__(self, url, page_set, run_no_page_interactions): |
12 super(Typical25Page, self).__init__( | 12 super(Typical25Page, self).__init__( |
13 url=url, page_set=page_set, | 13 url=url, page_set=page_set, |
14 shared_page_state_class=shared_page_state.SharedDesktopPageState) | 14 shared_page_state_class=shared_page_state.SharedDesktopPageState) |
15 self.archive_data_file = 'data/typical_25.json' | 15 self.archive_data_file = 'data/typical_25.json' |
16 self._run_no_page_interactions = run_no_page_interactions | 16 self._run_no_page_interactions = run_no_page_interactions |
17 | 17 |
18 def RunPageInteractions(self, action_runner): | 18 def RunPageInteractions(self, action_runner): |
19 if self._run_no_page_interactions: | 19 if self._run_no_page_interactions: |
20 return | 20 return |
21 with action_runner.CreateGestureInteraction('ScrollAction'): | 21 with action_runner.CreateGestureInteraction('ScrollAction'): |
22 action_runner.ScrollPage() | 22 action_runner.ScrollPage() |
23 | 23 |
24 | 24 |
25 class Typical25PageSet(page_set_module.PageSet): | 25 class Typical25PageSet(story.StorySet): |
26 | 26 |
27 """ Pages designed to represent the median, not highly optimized web """ | 27 """ Pages designed to represent the median, not highly optimized web """ |
28 | 28 |
29 def __init__(self, run_no_page_interactions=False): | 29 def __init__(self, run_no_page_interactions=False): |
30 super(Typical25PageSet, self).__init__( | 30 super(Typical25PageSet, self).__init__( |
31 archive_data_file='data/typical_25.json', | 31 archive_data_file='data/typical_25.json', |
32 bucket=page_set_module.PARTNER_BUCKET) | 32 cloud_storage_bucket=story.PARTNER_BUCKET) |
33 | 33 |
34 urls_list = [ | 34 urls_list = [ |
35 # Why: Alexa games #48 | 35 # Why: Alexa games #48 |
36 'http://www.nick.com/games', | 36 'http://www.nick.com/games', |
37 # Why: Alexa sports #45 | 37 # Why: Alexa sports #45 |
38 'http://www.rei.com/', | 38 'http://www.rei.com/', |
39 # Why: Alexa sports #50 | 39 # Why: Alexa sports #50 |
40 'http://www.fifa.com/', | 40 'http://www.fifa.com/', |
41 # Why: Alexa shopping #41 | 41 # Why: Alexa shopping #41 |
42 'http://www.gamestop.com/ps3', | 42 'http://www.gamestop.com/ps3', |
(...skipping 25 matching lines...) Expand all Loading... |
68 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-i
n-the-world', | 68 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-i
n-the-world', |
69 'http://www.airbnb.com/', | 69 'http://www.airbnb.com/', |
70 'http://www.ign.com/', | 70 'http://www.ign.com/', |
71 # Why: Alexa health #25 | 71 # Why: Alexa health #25 |
72 'http://www.fda.gov', | 72 'http://www.fda.gov', |
73 ] | 73 ] |
74 | 74 |
75 for url in urls_list: | 75 for url in urls_list: |
76 self.AddUserStory( | 76 self.AddUserStory( |
77 Typical25Page(url, self, run_no_page_interactions)) | 77 Typical25Page(url, self, run_no_page_interactions)) |
OLD | NEW |