| 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 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 # https://github.com/chromium/web-page-replay/issues/73. | 225 # https://github.com/chromium/web-page-replay/issues/73. |
| 226 NAME = 'load:media:soundcloud' | 226 NAME = 'load:media:soundcloud' |
| 227 URL = 'https://soundcloud.com/lifeofdesiigner/desiigner-panda' | 227 URL = 'https://soundcloud.com/lifeofdesiigner/desiigner-panda' |
| 228 | 228 |
| 229 | 229 |
| 230 class Load9GagStory(_LoadingStory): | 230 class Load9GagStory(_LoadingStory): |
| 231 NAME = 'load:media:9gag' | 231 NAME = 'load:media:9gag' |
| 232 URL = 'https://www.9gag.com/' | 232 URL = 'https://www.9gag.com/' |
| 233 | 233 |
| 234 | 234 |
| 235 class LoadFlickr(_LoadingStory): | 235 class LoadFlickrStory(_LoadingStory): |
| 236 NAME = 'load:media:flickr' | 236 NAME = 'load:media:flickr' |
| 237 URL = 'https://www.flickr.com/photos/tags/farm' | 237 URL = 'https://www.flickr.com/photos/tags/farm' |
| 238 | 238 |
| 239 def _DidLoadDocument(self, action_runner): | 239 def _DidLoadDocument(self, action_runner): |
| 240 # Wait until the 'Recently tagged' view loads. | 240 # Wait until the 'Recently tagged' view loads. |
| 241 action_runner.WaitForJavaScriptCondition(''' | 241 action_runner.WaitForJavaScriptCondition(''' |
| 242 document.querySelector( | 242 document.querySelector( |
| 243 '.search-photos-everyone-trending-view .photo-list-view') | 243 '.search-photos-everyone-trending-view .photo-list-view') |
| 244 !== null''') | 244 !== null''') |
| 245 | 245 |
| 246 | 246 |
| 247 class LoadImgur(_LoadingStory): | 247 class LoadImgurStory(_LoadingStory): |
| 248 NAME = 'load:media:imgur' | 248 NAME = 'load:media:imgur' |
| 249 URL = 'http://imgur.com/gallery/5UlBN' | 249 URL = 'http://imgur.com/gallery/5UlBN' |
| 250 | 250 |
| 251 | 251 |
| 252 class LoadFacebookPhotosMobileStory(_LoadingStory): |
| 253 NAME = 'load:media:facebook_photos' |
| 254 URL = ( |
| 255 '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 |
| 257 |
| 258 |
| 259 class LoadFacebookPhotosDesktopStory(_LoadingStory): |
| 260 NAME = 'load:media:facebook_photos' |
| 261 URL = ( |
| 262 '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 |
| 264 # theater viewer. |
| 265 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS |
| 266 |
| 267 |
| 252 ################################################################################ | 268 ################################################################################ |
| 253 # Online tools (documents, emails, storage, ...). | 269 # Online tools (documents, emails, storage, ...). |
| 254 ################################################################################ | 270 ################################################################################ |
| 255 | 271 |
| 256 | 272 |
| 257 class LoadDocsStory(_LoadingStory): | 273 class LoadDocsStory(_LoadingStory): |
| 258 NAME = 'load:tools:docs' | 274 NAME = 'load:tools:docs' |
| 259 URL = ( | 275 URL = ( |
| 260 'https://docs.google.com/document/d/1GvzDP-tTLmJ0myRhUAfTYWs3ZUFilUICg8psN
HyccwQ/edit?usp=sharing') | 276 'https://docs.google.com/document/d/1GvzDP-tTLmJ0myRhUAfTYWs3ZUFilUICg8psN
HyccwQ/edit?usp=sharing') |
| 261 | 277 |
| 262 | 278 |
| 263 class _LoadGmailBaseStory(_LoadingStory): | 279 class _LoadGmailBaseStory(_LoadingStory): |
| 264 NAME = 'load:tools:gmail' | 280 NAME = 'load:tools:gmail' |
| 265 URL = 'https://mail.google.com/mail/' | 281 URL = 'https://mail.google.com/mail/' |
| 266 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 282 ABSTRACT_STORY = True |
| 267 | 283 |
| 268 def _Login(self, action_runner): | 284 def _Login(self, action_runner): |
| 269 google_login.LoginGoogleAccount(action_runner, 'googletest', | 285 google_login.LoginGoogleAccount(action_runner, 'googletest', |
| 270 self.credentials_path) | 286 self.credentials_path) |
| 271 | 287 |
| 272 # Navigating to https://mail.google.com immediately leads to an infinite | 288 # Navigating to https://mail.google.com immediately leads to an infinite |
| 273 # redirection loop due to a bug in WPR (see | 289 # redirection loop due to a bug in WPR (see |
| 274 # https://github.com/chromium/web-page-replay/issues/70). We therefore first | 290 # https://github.com/chromium/web-page-replay/issues/70). We therefore first |
| 275 # navigate to a sub-URL to set up the session and hit the resulting | 291 # navigate to a sub-URL to set up the session and hit the resulting |
| 276 # redirection loop. Afterwards, we can safely navigate to | 292 # redirection loop. Afterwards, we can safely navigate to |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 URL = 'http://www.miniclip.com/games/en/' | 391 URL = 'http://www.miniclip.com/games/en/' |
| 376 # Desktop only (requires Flash). | 392 # Desktop only (requires Flash). |
| 377 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 393 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 378 | 394 |
| 379 | 395 |
| 380 class LoadAlphabettyStory(_LoadingStory): | 396 class LoadAlphabettyStory(_LoadingStory): |
| 381 NAME = 'load:games:alphabetty' | 397 NAME = 'load:games:alphabetty' |
| 382 URL = 'https://king.com/play/alphabetty' | 398 URL = 'https://king.com/play/alphabetty' |
| 383 # Desktop only (requires Flash). | 399 # Desktop only (requires Flash). |
| 384 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 400 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| OLD | NEW |