| 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 system_health_story | 6 from page_sets.system_health import system_health_story |
| 7 | 7 |
| 8 from page_sets.login_helpers import dropbox_login | 8 from page_sets.login_helpers import dropbox_login |
| 9 from page_sets.login_helpers import google_login | 9 from page_sets.login_helpers import google_login |
| 10 | 10 |
| 11 from telemetry import decorators |
| 12 |
| 11 | 13 |
| 12 class _LoadingStory(system_health_story.SystemHealthStory): | 14 class _LoadingStory(system_health_story.SystemHealthStory): |
| 13 """Abstract base class for single-page System Health user stories.""" | 15 """Abstract base class for single-page System Health user stories.""" |
| 14 ABSTRACT_STORY = True | 16 ABSTRACT_STORY = True |
| 15 | 17 |
| 16 | 18 |
| 17 ################################################################################ | 19 ################################################################################ |
| 18 # Search and e-commerce. | 20 # Search and e-commerce. |
| 19 ################################################################################ | 21 ################################################################################ |
| 20 # TODO(petrcermak): Split these into 'portal' and 'shopping' stories. | 22 # TODO(petrcermak): Split these into 'portal' and 'shopping' stories. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 # Using Facebook login often causes "404 Not Found" with WPR. | 75 # Using Facebook login often causes "404 Not Found" with WPR. |
| 74 NAME = 'load:social:facebook' | 76 NAME = 'load:social:facebook' |
| 75 URL = 'https://www.facebook.com/rihanna' | 77 URL = 'https://www.facebook.com/rihanna' |
| 76 | 78 |
| 77 | 79 |
| 78 class LoadTwitterStory(_LoadingStory): | 80 class LoadTwitterStory(_LoadingStory): |
| 79 NAME = 'load:social:twitter' | 81 NAME = 'load:social:twitter' |
| 80 URL = 'https://www.twitter.com/nasa' | 82 URL = 'https://www.twitter.com/nasa' |
| 81 | 83 |
| 82 | 84 |
| 85 # Due to the deterministic date injected by WPR (February 2008), the cookie set |
| 86 # by https://vk.com immediately expires, so the page keeps refreshing |
| 87 # indefinitely on mobile |
| 88 # (see https://github.com/chromium/web-page-replay/issues/71). |
| 89 @decorators.Disabled('android') |
| 83 class LoadVkStory(_LoadingStory): | 90 class LoadVkStory(_LoadingStory): |
| 84 NAME = 'load:social:vk' | 91 NAME = 'load:social:vk' |
| 85 URL = 'https://vk.com/sbeatles' | 92 URL = 'https://vk.com/sbeatles' |
| 86 # Due to the deterministic date injected by WPR (February 2008), the cookie | |
| 87 # set by https://vk.com immediately expires, so the page keeps refreshing | |
| 88 # indefinitely on mobile | |
| 89 # (see https://github.com/chromium/web-page-replay/issues/71). | |
| 90 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | |
| 91 | 93 |
| 92 | 94 |
| 93 class LoadInstagramStory(_LoadingStory): | 95 class LoadInstagramStory(_LoadingStory): |
| 94 NAME = 'load:social:instagram' | 96 NAME = 'load:social:instagram' |
| 95 URL = 'https://www.instagram.com/selenagomez/' | 97 URL = 'https://www.instagram.com/selenagomez/' |
| 96 | 98 |
| 97 | 99 |
| 98 class LoadPinterestStory(_LoadingStory): | 100 class LoadPinterestStory(_LoadingStory): |
| 99 NAME = 'load:social:pinterest' | 101 NAME = 'load:social:pinterest' |
| 100 URL = 'https://uk.pinterest.com/categories/popular/' | 102 URL = 'https://uk.pinterest.com/categories/popular/' |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' | 158 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' |
| 157 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 159 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 158 | 160 |
| 159 | 161 |
| 160 class LoadRedditMobileStory(_LoadingStory): | 162 class LoadRedditMobileStory(_LoadingStory): |
| 161 NAME = 'load:news:reddit' | 163 NAME = 'load:news:reddit' |
| 162 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' | 164 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' |
| 163 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 165 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 164 | 166 |
| 165 | 167 |
| 166 class LoadSohuStory(_LoadingStory): | 168 class LoadSohuMobileStory(_LoadingStory): |
| 167 NAME = 'load:news:sohu' | 169 NAME = 'load:news:sohu' |
| 168 # Using "https://" leads to missing images and scripts on mobile (due to | 170 # Using "https://" leads to missing images and scripts on mobile (due to |
| 169 # mixed content). | 171 # mixed content). |
| 170 URL = 'http://m.sohu.com/n/447433356/' | 172 URL = 'http://m.sohu.com/n/447433356/' |
| 171 # The desktop page (http://news.sohu.com/20160503/n447433356.shtml) almost | 173 # The desktop page (http://news.sohu.com/20160503/n447433356.shtml) almost |
| 172 # always fails to completely load due to | 174 # always fails to completely load due to |
| 173 # https://github.com/chromium/web-page-replay/issues/74. | 175 # https://github.com/chromium/web-page-replay/issues/74. |
| 174 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 176 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 175 | 177 |
| 176 | 178 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 URL = 'http://imgur.com/gallery/5UlBN' | 251 URL = 'http://imgur.com/gallery/5UlBN' |
| 250 | 252 |
| 251 | 253 |
| 252 class LoadFacebookPhotosMobileStory(_LoadingStory): | 254 class LoadFacebookPhotosMobileStory(_LoadingStory): |
| 253 NAME = 'load:media:facebook_photos' | 255 NAME = 'load:media:facebook_photos' |
| 254 URL = ( | 256 URL = ( |
| 255 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') | 257 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') |
| 256 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 258 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 257 | 259 |
| 258 | 260 |
| 261 # Recording currently does not work. The page gets stuck in the theater viewer. |
| 262 @decorators.Disabled('all') |
| 259 class LoadFacebookPhotosDesktopStory(_LoadingStory): | 263 class LoadFacebookPhotosDesktopStory(_LoadingStory): |
| 260 NAME = 'load:media:facebook_photos' | 264 NAME = 'load:media:facebook_photos' |
| 261 URL = ( | 265 URL = ( |
| 262 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') | 266 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') |
| 263 # Recording currently does not work. The page gets stuck in the | 267 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 264 # theater viewer. | |
| 265 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS | |
| 266 | 268 |
| 267 | 269 |
| 268 ################################################################################ | 270 ################################################################################ |
| 269 # Online tools (documents, emails, storage, ...). | 271 # Online tools (documents, emails, storage, ...). |
| 270 ################################################################################ | 272 ################################################################################ |
| 271 | 273 |
| 272 | 274 |
| 273 class LoadDocsStory(_LoadingStory): | 275 class LoadDocsStory(_LoadingStory): |
| 274 NAME = 'load:tools:docs' | 276 NAME = 'load:tools:docs' |
| 275 URL = ( | 277 URL = ( |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 # The background of the game canvas is set when the "Tap screen to play" | 384 # The background of the game canvas is set when the "Tap screen to play" |
| 383 # caption is displayed. | 385 # caption is displayed. |
| 384 action_runner.WaitForJavaScriptCondition( | 386 action_runner.WaitForJavaScriptCondition( |
| 385 'document.querySelector("#game canvas").style.background !== ""') | 387 'document.querySelector("#game canvas").style.background !== ""') |
| 386 | 388 |
| 387 | 389 |
| 388 class LoadMiniclipStory(_LoadingStory): | 390 class LoadMiniclipStory(_LoadingStory): |
| 389 NAME = 'load:games:miniclip' | 391 NAME = 'load:games:miniclip' |
| 390 # Using "https://" causes "404 Not Found" during WPR recording. | 392 # Using "https://" causes "404 Not Found" during WPR recording. |
| 391 URL = 'http://www.miniclip.com/games/en/' | 393 URL = 'http://www.miniclip.com/games/en/' |
| 392 # Desktop only (requires Flash). | 394 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| 393 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | |
| 394 | 395 |
| 395 | 396 |
| 396 class LoadAlphabettyStory(_LoadingStory): | 397 class LoadAlphabettyStory(_LoadingStory): |
| 397 NAME = 'load:games:alphabetty' | 398 NAME = 'load:games:alphabetty' |
| 398 URL = 'https://king.com/play/alphabetty' | 399 URL = 'https://king.com/play/alphabetty' |
| 399 # Desktop only (requires Flash). | 400 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| 400 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | |
| OLD | NEW |