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; drag and drop anywhere """ | |
Sami
2015/02/27 15:33:05
Not sure what you mean by "drag and drop anywhere"
ssid
2015/02/27 15:52:04
I wrote drag and drop anywhere in sense that you c
Sami
2015/02/27 16:02:32
Sorry, I was just confused because "drag & drop" m
ssid
2015/03/02 12:03:27
Done.
| |
81 | |
82 def RunPageInteractions(self, action_runner): | |
83 action_runner.WaitForElement(selector='.widget-scene-canvas') | |
84 action_runner.WaitForElement(selector='.widget-zoom-in') | |
85 action_runner.WaitForElement(selector='.widget-zoom-out') | |
86 action_runner.Wait(2) | |
Sami
2015/02/27 15:33:05
All this waiting should be done in RunNavigateStep
ssid
2015/03/02 12:03:27
Done.
| |
87 interaction = action_runner.BeginGestureInteraction( | |
88 'DragAction', is_smooth=True) | |
89 action_runner.DragPage(left_start_ratio=0.5, top_start_ratio=0.75, | |
90 left_end_ratio=0.75, top_end_ratio=0.5) | |
91 interaction.End() | |
92 action_runner.Wait(2) | |
93 interaction = action_runner.BeginGestureInteraction( | |
94 'DragAction', is_smooth=True) | |
95 action_runner.DragPage(left_start_ratio=0.5, top_start_ratio=0.5, | |
96 left_end_ratio=0.35, top_end_ratio=0.75) | |
97 interaction.End() | |
Sami
2015/02/27 15:33:05
Could you add a TODO here about doing a zoom gestu
ssid
2015/03/02 12:03:27
Done.
| |
98 | |
99 | |
78 class ESPNSmoothPage(top_pages.ESPNPage): | 100 class ESPNSmoothPage(top_pages.ESPNPage): |
79 | 101 |
80 """ Why: #1 sports """ | 102 """ Why: #1 sports """ |
81 | 103 |
82 def RunPageInteractions(self, action_runner): | 104 def RunPageInteractions(self, action_runner): |
83 interaction = action_runner.BeginGestureInteraction( | 105 interaction = action_runner.BeginGestureInteraction( |
84 'ScrollAction', is_smooth=True) | 106 'ScrollAction', is_smooth=True) |
85 action_runner.ScrollPage(left_start_ratio=0.1) | 107 action_runner.ScrollPage(left_start_ratio=0.1) |
86 interaction.End() | 108 interaction.End() |
87 | 109 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 top_pages.WikipediaPage)(self)) | 141 top_pages.WikipediaPage)(self)) |
120 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 142 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
121 top_pages.TwitterPage)(self)) | 143 top_pages.TwitterPage)(self)) |
122 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 144 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
123 top_pages.PinterestPage)(self)) | 145 top_pages.PinterestPage)(self)) |
124 self.AddUserStory(ESPNSmoothPage(self)) | 146 self.AddUserStory(ESPNSmoothPage(self)) |
125 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 147 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
126 top_pages.WeatherPage)(self)) | 148 top_pages.WeatherPage)(self)) |
127 self.AddUserStory(_CreatePageClassWithSmoothInteractions( | 149 self.AddUserStory(_CreatePageClassWithSmoothInteractions( |
128 top_pages.YahooGamesPage)(self)) | 150 top_pages.YahooGamesPage)(self)) |
151 self.AddUserStory(GoogleMapsPage(self)) | |
129 | 152 |
130 other_urls = [ | 153 other_urls = [ |
131 # Why: #1 news worldwide (Alexa global) | 154 # Why: #1 news worldwide (Alexa global) |
132 'http://news.yahoo.com', | 155 'http://news.yahoo.com', |
133 # Why: #2 news worldwide | 156 # Why: #2 news worldwide |
134 'http://www.cnn.com', | 157 'http://www.cnn.com', |
135 # Why: #1 world commerce website by visits; #3 commerce in the US by | 158 # Why: #1 world commerce website by visits; #3 commerce in the US by |
136 # time spent | 159 # time spent |
137 'http://www.amazon.com', | 160 'http://www.amazon.com', |
138 # Why: #1 commerce website by time spent by users in US | 161 # Why: #1 commerce website by time spent by users in US |
139 'http://www.ebay.com', | 162 'http://www.ebay.com', |
140 # Why: #1 Alexa recreation | 163 # Why: #1 Alexa recreation |
141 'http://booking.com', | 164 'http://booking.com', |
142 # Why: #1 Alexa reference | 165 # Why: #1 Alexa reference |
143 'http://answers.yahoo.com', | 166 'http://answers.yahoo.com', |
144 # Why: #1 Alexa sports | 167 # Why: #1 Alexa sports |
145 'http://sports.yahoo.com/', | 168 'http://sports.yahoo.com/', |
146 # Why: top tech blog | 169 # Why: top tech blog |
147 'http://techcrunch.com' | 170 'http://techcrunch.com' |
148 ] | 171 ] |
149 | 172 |
150 for url in other_urls: | 173 for url in other_urls: |
151 self.AddUserStory(TopSmoothPage(url, self)) | 174 self.AddUserStory(TopSmoothPage(url, self)) |
OLD | NEW |