OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 4 |
5 from page_sets.system_health import platforms | 5 from page_sets.system_health import platforms |
6 from page_sets.system_health import story_tags | 6 from page_sets.system_health import story_tags |
7 from page_sets.system_health import system_health_story | 7 from page_sets.system_health import system_health_story |
8 | 8 |
9 from page_sets.login_helpers import dropbox_login | 9 from page_sets.login_helpers import dropbox_login |
10 from page_sets.login_helpers import google_login | 10 from page_sets.login_helpers import google_login |
(...skipping 21 matching lines...) Expand all Loading... |
32 NAME = 'load:search:baidu' | 32 NAME = 'load:search:baidu' |
33 URL = 'https://www.baidu.com/s?word=google' | 33 URL = 'https://www.baidu.com/s?word=google' |
34 TAGS = [story_tags.INTERNATIONAL] | 34 TAGS = [story_tags.INTERNATIONAL] |
35 | 35 |
36 | 36 |
37 class LoadYahooStory(_LoadingStory): | 37 class LoadYahooStory(_LoadingStory): |
38 NAME = 'load:search:yahoo' | 38 NAME = 'load:search:yahoo' |
39 URL = 'https://search.yahoo.com/search;_ylt=?p=google' | 39 URL = 'https://search.yahoo.com/search;_ylt=?p=google' |
40 | 40 |
41 | 41 |
42 class LoadAmazonStory(_LoadingStory): | 42 class LoadAmazonDesktopStory(_LoadingStory): |
43 NAME = 'load:search:amazon' | 43 NAME = 'load:search:amazon' |
44 URL = 'https://www.amazon.com/s/?field-keywords=nexus' | 44 URL = 'https://www.amazon.com/s/?field-keywords=nexus' |
| 45 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
45 | 46 |
46 | 47 |
47 class LoadTaobaoDesktopStory(_LoadingStory): | 48 class LoadTaobaoDesktopStory(_LoadingStory): |
48 NAME = 'load:search:taobao' | 49 NAME = 'load:search:taobao' |
49 URL = 'https://world.taobao.com/' | 50 URL = 'https://world.taobao.com/' |
50 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 51 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
51 TAGS = [story_tags.INTERNATIONAL] | 52 TAGS = [story_tags.INTERNATIONAL] |
52 | 53 |
53 | 54 |
54 class LoadTaobaoMobileStory(_LoadingStory): | 55 class LoadTaobaoMobileStory(_LoadingStory): |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 NAME = 'load:social:vk' | 92 NAME = 'load:social:vk' |
92 URL = 'https://vk.com/sbeatles' | 93 URL = 'https://vk.com/sbeatles' |
93 # Due to the deterministic date injected by WPR (February 2008), the cookie | 94 # Due to the deterministic date injected by WPR (February 2008), the cookie |
94 # set by https://vk.com immediately expires, so the page keeps refreshing | 95 # set by https://vk.com immediately expires, so the page keeps refreshing |
95 # indefinitely on mobile | 96 # indefinitely on mobile |
96 # (see https://github.com/chromium/web-page-replay/issues/71). | 97 # (see https://github.com/chromium/web-page-replay/issues/71). |
97 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 98 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
98 TAGS = [story_tags.INTERNATIONAL] | 99 TAGS = [story_tags.INTERNATIONAL] |
99 | 100 |
100 | 101 |
101 class LoadInstagramStory(_LoadingStory): | 102 class LoadInstagramDesktopStory(_LoadingStory): |
102 NAME = 'load:social:instagram' | 103 NAME = 'load:social:instagram' |
103 URL = 'https://www.instagram.com/selenagomez/' | 104 URL = 'https://www.instagram.com/selenagomez/' |
| 105 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
104 | 106 |
105 | 107 |
106 class LoadPinterestStory(_LoadingStory): | 108 class LoadPinterestStory(_LoadingStory): |
107 NAME = 'load:social:pinterest' | 109 NAME = 'load:social:pinterest' |
108 URL = 'https://uk.pinterest.com/categories/popular/' | 110 URL = 'https://uk.pinterest.com/categories/popular/' |
109 TAGS = [story_tags.JAVASCRIPT_HEAVY] | 111 TAGS = [story_tags.JAVASCRIPT_HEAVY] |
110 | 112 |
111 | 113 |
112 class LoadTumblrStory(_LoadingStory): | 114 class LoadTumblrStory(_LoadingStory): |
113 NAME = 'load:social:tumblr' | 115 NAME = 'load:social:tumblr' |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 has_button = action_runner.EvaluateJavaScript( | 203 has_button = action_runner.EvaluateJavaScript( |
202 '!!document.querySelector({{ selector }})', | 204 '!!document.querySelector({{ selector }})', |
203 selector=self._CLOSE_BUTTON_SELECTOR) | 205 selector=self._CLOSE_BUTTON_SELECTOR) |
204 if has_button: | 206 if has_button: |
205 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) | 207 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) |
206 | 208 |
207 | 209 |
208 class LoadWikipediaStory(_LoadingStory): | 210 class LoadWikipediaStory(_LoadingStory): |
209 NAME = 'load:news:wikipedia' | 211 NAME = 'load:news:wikipedia' |
210 URL = 'https://en.wikipedia.org/wiki/Science' | 212 URL = 'https://en.wikipedia.org/wiki/Science' |
| 213 TAGS = [story_tags.EMERGING_MARKET] |
| 214 |
| 215 |
| 216 class LoadIrctcStory(_LoadingStory): |
| 217 NAME = 'load:news:irctc' |
| 218 URL = 'https://www.irctc.co.in' |
| 219 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 220 TAGS = [story_tags.EMERGING_MARKET] |
211 | 221 |
212 | 222 |
213 ################################################################################ | 223 ################################################################################ |
214 # Audio, images, and video. | 224 # Audio, images, and video. |
215 ################################################################################ | 225 ################################################################################ |
216 | 226 |
217 | 227 |
218 class LoadYouTubeStory(_LoadingStory): | 228 class LoadYouTubeStory(_LoadingStory): |
219 # No way to disable autoplay on desktop. | 229 # No way to disable autoplay on desktop. |
220 NAME = 'load:media:youtube' | 230 NAME = 'load:media:youtube' |
221 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' | 231 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' |
222 PLATFORM_SPECIFIC = True | 232 PLATFORM_SPECIFIC = True |
| 233 TAGS = [story_tags.EMERGING_MARKET] |
223 | 234 |
224 | 235 |
225 class LoadDailymotionStory(_LoadingStory): | 236 class LoadDailymotionStory(_LoadingStory): |
226 # The side panel with related videos doesn't show on desktop due to | 237 # The side panel with related videos doesn't show on desktop due to |
227 # https://github.com/chromium/web-page-replay/issues/74. | 238 # https://github.com/chromium/web-page-replay/issues/74. |
228 NAME = 'load:media:dailymotion' | 239 NAME = 'load:media:dailymotion' |
229 URL = ( | 240 URL = ( |
230 'https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slin
ky-skills_fun?autoplay=false') | 241 'https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slin
ky-skills_fun?autoplay=false') |
231 | 242 |
232 | 243 |
(...skipping 29 matching lines...) Expand all Loading... |
262 class LoadImgurStory(_LoadingStory): | 273 class LoadImgurStory(_LoadingStory): |
263 NAME = 'load:media:imgur' | 274 NAME = 'load:media:imgur' |
264 URL = 'http://imgur.com/gallery/5UlBN' | 275 URL = 'http://imgur.com/gallery/5UlBN' |
265 | 276 |
266 | 277 |
267 class LoadFacebookPhotosMobileStory(_LoadingStory): | 278 class LoadFacebookPhotosMobileStory(_LoadingStory): |
268 NAME = 'load:media:facebook_photos' | 279 NAME = 'load:media:facebook_photos' |
269 URL = ( | 280 URL = ( |
270 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') | 281 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') |
271 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 282 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 283 TAGS = [story_tags.EMERGING_MARKET] |
272 | 284 |
273 | 285 |
274 class LoadFacebookPhotosDesktopStory(_LoadingStory): | 286 class LoadFacebookPhotosDesktopStory(_LoadingStory): |
275 NAME = 'load:media:facebook_photos' | 287 NAME = 'load:media:facebook_photos' |
276 URL = ( | 288 URL = ( |
277 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') | 289 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') |
278 # Recording currently does not work. The page gets stuck in the | 290 # Recording currently does not work. The page gets stuck in the |
279 # theater viewer. | 291 # theater viewer. |
280 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS | 292 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS |
281 | 293 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 @decorators.Disabled('android') # crbug.com/657433 | 336 @decorators.Disabled('android') # crbug.com/657433 |
325 class LoadGmailMobileStory(_LoadGmailBaseStory): | 337 class LoadGmailMobileStory(_LoadGmailBaseStory): |
326 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 338 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
327 | 339 |
328 def _DidLoadDocument(self, action_runner): | 340 def _DidLoadDocument(self, action_runner): |
329 # Wait until the UI loads. | 341 # Wait until the UI loads. |
330 action_runner.WaitForElement('#apploadingdiv') | 342 action_runner.WaitForElement('#apploadingdiv') |
331 action_runner.WaitForJavaScriptCondition( | 343 action_runner.WaitForJavaScriptCondition( |
332 'document.getElementById("apploadingdiv").style.height === "0px"') | 344 'document.getElementById("apploadingdiv").style.height === "0px"') |
333 | 345 |
334 class LoadMapsStory(_LoadingStory): | |
335 NAME = 'load:tools:maps' | |
336 URL = 'https://www.google.com/maps/place/London,+UK/' | |
337 | |
338 | |
339 class LoadStackOverflowStory(_LoadingStory): | 346 class LoadStackOverflowStory(_LoadingStory): |
340 NAME = 'load:tools:stackoverflow' | 347 NAME = 'load:tools:stackoverflow' |
341 URL = ( | 348 URL = ( |
342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') | 349 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') |
343 | 350 |
344 | 351 |
345 class LoadDropboxStory(_LoadingStory): | 352 class LoadDropboxStory(_LoadingStory): |
346 NAME = 'load:tools:dropbox' | 353 NAME = 'load:tools:dropbox' |
347 URL = 'https://www.dropbox.com' | 354 URL = 'https://www.dropbox.com' |
348 | 355 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 NAME = 'load:games:miniclip' | 412 NAME = 'load:games:miniclip' |
406 # Using "https://" causes "404 Not Found" during WPR recording. | 413 # Using "https://" causes "404 Not Found" during WPR recording. |
407 URL = 'http://www.miniclip.com/games/en/' | 414 URL = 'http://www.miniclip.com/games/en/' |
408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 415 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
409 | 416 |
410 | 417 |
411 class LoadAlphabettyStory(_LoadingStory): | 418 class LoadAlphabettyStory(_LoadingStory): |
412 NAME = 'load:games:alphabetty' | 419 NAME = 'load:games:alphabetty' |
413 URL = 'https://king.com/play/alphabetty' | 420 URL = 'https://king.com/play/alphabetty' |
414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 421 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
OLD | NEW |