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 as page_module | 4 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_module |
6 | 6 |
7 from page_sets import top_pages | 7 from page_sets import top_pages |
8 | 8 |
9 | 9 |
10 def _IssueMarkerAndScroll(action_runner): | 10 def _IssueMarkerAndScroll(action_runner): |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 """ Why: productivity, top google properties; Sample doc in the link """ | 69 """ Why: productivity, top google properties; Sample doc in the link """ |
70 | 70 |
71 def RunPageInteractions(self, action_runner): | 71 def RunPageInteractions(self, action_runner): |
72 interaction = action_runner.BeginGestureInteraction( | 72 interaction = action_runner.BeginGestureInteraction( |
73 'ScrollAction', is_smooth=True) | 73 'ScrollAction', is_smooth=True) |
74 action_runner.ScrollElement(selector='.kix-appview-editor') | 74 action_runner.ScrollElement(selector='.kix-appview-editor') |
75 interaction.End() | 75 interaction.End() |
76 | 76 |
77 | 77 |
78 class GoogleMapsPage(top_pages.GoogleMapsPage): | |
79 | |
80 """ Why: productivity, top google properties; Supports drag gestures """ | |
81 | |
82 def RunPageInteractions(self, action_runner): | |
83 interaction = action_runner.BeginGestureInteraction( | |
84 'DragAction', is_smooth=True) | |
85 action_runner.DragPage(left_start_ratio=0.5, top_start_ratio=0.75, | |
86 left_end_ratio=0.75, top_end_ratio=0.5) | |
87 interaction.End() | |
88 action_runner.Wait(2) | |
89 interaction = action_runner.BeginGestureInteraction( | |
90 'DragAction', is_smooth=True) | |
91 action_runner.DragPage(left_start_ratio=0.5, top_start_ratio=0.5, | |
92 left_end_ratio=0.35, top_end_ratio=0.75) | |
93 interaction.End() | |
94 # TODO(ssid): Add zoom gestures after fixing bug crbug.com/462214. | |
95 | |
96 | |
97 class ESPNSmoothPage(top_pages.ESPNPage): | 78 class ESPNSmoothPage(top_pages.ESPNPage): |
98 | 79 |
99 """ Why: #1 sports """ | 80 """ Why: #1 sports """ |
100 | 81 |
101 def RunPageInteractions(self, action_runner): | 82 def RunPageInteractions(self, action_runner): |
102 interaction = action_runner.BeginGestureInteraction( | 83 interaction = action_runner.BeginGestureInteraction( |
103 'ScrollAction', is_smooth=True) | 84 'ScrollAction', is_smooth=True) |
104 action_runner.ScrollPage(left_start_ratio=0.1) | 85 action_runner.ScrollPage(left_start_ratio=0.1) |
105 interaction.End() | 86 interaction.End() |
106 | 87 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 top_pages.WikipediaPage)(self)) | 119 top_pages.WikipediaPage)(self)) |
139 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 120 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
140 top_pages.TwitterPage)(self)) | 121 top_pages.TwitterPage)(self)) |
141 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 122 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
142 top_pages.PinterestPage)(self)) | 123 top_pages.PinterestPage)(self)) |
143 self.AddUserStory(ESPNSmoothPage(self)) | 124 self.AddUserStory(ESPNSmoothPage(self)) |
144 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 125 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
145 top_pages.WeatherPage)(self)) | 126 top_pages.WeatherPage)(self)) |
146 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 127 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
147 top_pages.YahooGamesPage)(self)) | 128 top_pages.YahooGamesPage)(self)) |
148 self.AddUserStory(GoogleMapsPage(self)) | |
149 | 129 |
150 other_urls = [ | 130 other_urls = [ |
151 # Why: #1 news worldwide (Alexa global) | 131 # Why: #1 news worldwide (Alexa global) |
152 'http://news.yahoo.com', | 132 'http://news.yahoo.com', |
153 # Why: #2 news worldwide | 133 # Why: #2 news worldwide |
154 'http://www.cnn.com', | 134 'http://www.cnn.com', |
155 # Why: #1 world commerce website by visits; #3 commerce in the US by | 135 # Why: #1 world commerce website by visits; #3 commerce in the US by |
156 # time spent | 136 # time spent |
157 'http://www.amazon.com', | 137 'http://www.amazon.com', |
158 # Why: #1 commerce website by time spent by users in US | 138 # Why: #1 commerce website by time spent by users in US |
159 'http://www.ebay.com', | 139 'http://www.ebay.com', |
160 # Why: #1 Alexa recreation | 140 # Why: #1 Alexa recreation |
161 'http://booking.com', | 141 'http://booking.com', |
162 # Why: #1 Alexa reference | 142 # Why: #1 Alexa reference |
163 'http://answers.yahoo.com', | 143 'http://answers.yahoo.com', |
164 # Why: #1 Alexa sports | 144 # Why: #1 Alexa sports |
165 'http://sports.yahoo.com/', | 145 'http://sports.yahoo.com/', |
166 # Why: top tech blog | 146 # Why: top tech blog |
167 'http://techcrunch.com' | 147 'http://techcrunch.com' |
168 ] | 148 ] |
169 | 149 |
170 for url in other_urls: | 150 for url in other_urls: |
171 self.AddUserStory(TopSmoothPage(url, self)) | 151 self.AddUserStory(TopSmoothPage(url, self)) |
OLD | NEW |