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 |
11 | 11 |
12 from telemetry import decorators | 12 from telemetry import decorators |
13 | 13 |
14 | 14 |
15 class _LoadingStory(system_health_story.SystemHealthStory): | 15 class _LoadingStory(system_health_story.SystemHealthStory): |
16 """Abstract base class for single-page System Health user stories.""" | 16 """Abstract base class for single-page System Health user stories.""" |
17 ABSTRACT_STORY = True | 17 ABSTRACT_STORY = True |
18 | 18 |
| 19 @classmethod |
| 20 def GenerateStoryDescription(cls): |
| 21 return 'Load %s' % cls.URL |
| 22 |
19 | 23 |
20 ################################################################################ | 24 ################################################################################ |
21 # Search and e-commerce. | 25 # Search and e-commerce. |
22 ################################################################################ | 26 ################################################################################ |
23 # TODO(petrcermak): Split these into 'portal' and 'shopping' stories. | 27 # TODO(petrcermak): Split these into 'portal' and 'shopping' stories. |
24 | 28 |
25 | 29 |
26 class LoadGoogleStory(_LoadingStory): | 30 class LoadGoogleStory(_LoadingStory): |
27 NAME = 'load:search:google' | 31 NAME = 'load:search:google' |
28 URL = 'https://www.google.co.uk/' | 32 URL = 'https://www.google.co.uk/' |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 '.search-photos-everyone-trending-view .photo-list-view') | 266 '.search-photos-everyone-trending-view .photo-list-view') |
263 !== null''') | 267 !== null''') |
264 | 268 |
265 | 269 |
266 class LoadImgurStory(_LoadingStory): | 270 class LoadImgurStory(_LoadingStory): |
267 NAME = 'load:media:imgur' | 271 NAME = 'load:media:imgur' |
268 URL = 'http://imgur.com/gallery/5UlBN' | 272 URL = 'http://imgur.com/gallery/5UlBN' |
269 | 273 |
270 | 274 |
271 class LoadFacebookPhotosMobileStory(_LoadingStory): | 275 class LoadFacebookPhotosMobileStory(_LoadingStory): |
| 276 """Load a page of rihanna's facebook with a photo.""" |
272 NAME = 'load:media:facebook_photos' | 277 NAME = 'load:media:facebook_photos' |
273 URL = ( | 278 URL = ( |
274 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') | 279 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1
0153911739606676/?type=3&source=54&ref=page_internal') |
275 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 280 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
276 TAGS = [story_tags.EMERGING_MARKET] | 281 TAGS = [story_tags.EMERGING_MARKET] |
277 | 282 |
278 | 283 |
279 class LoadFacebookPhotosDesktopStory(_LoadingStory): | 284 class LoadFacebookPhotosDesktopStory(_LoadingStory): |
| 285 """Load a page of rihanna's facebook with a photo.""" |
280 NAME = 'load:media:facebook_photos' | 286 NAME = 'load:media:facebook_photos' |
281 URL = ( | 287 URL = ( |
282 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') | 288 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675
/10153911739606676/?type=3&theater') |
283 # Recording currently does not work. The page gets stuck in the | 289 # Recording currently does not work. The page gets stuck in the |
284 # theater viewer. | 290 # theater viewer. |
285 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS | 291 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS |
286 | 292 |
287 | 293 |
288 ################################################################################ | 294 ################################################################################ |
289 # Online tools (documents, emails, storage, ...). | 295 # Online tools (documents, emails, storage, ...). |
290 ################################################################################ | 296 ################################################################################ |
291 | 297 |
292 | 298 |
293 class LoadDocsStory(_LoadingStory): | 299 class LoadDocsStory(_LoadingStory): |
| 300 """Load a typical google doc page.""" |
294 NAME = 'load:tools:docs' | 301 NAME = 'load:tools:docs' |
295 URL = ( | 302 URL = ( |
296 'https://docs.google.com/document/d/1GvzDP-tTLmJ0myRhUAfTYWs3ZUFilUICg8psN
HyccwQ/edit?usp=sharing') | 303 'https://docs.google.com/document/d/1GvzDP-tTLmJ0myRhUAfTYWs3ZUFilUICg8psN
HyccwQ/edit?usp=sharing') |
297 | 304 |
298 | 305 |
299 class _LoadGmailBaseStory(_LoadingStory): | 306 class _LoadGmailBaseStory(_LoadingStory): |
300 NAME = 'load:tools:gmail' | 307 NAME = 'load:tools:gmail' |
301 URL = 'https://mail.google.com/mail/' | 308 URL = 'https://mail.google.com/mail/' |
302 ABSTRACT_STORY = True | 309 ABSTRACT_STORY = True |
303 | 310 |
(...skipping 26 matching lines...) Expand all Loading... |
330 class LoadGmailMobileStory(_LoadGmailBaseStory): | 337 class LoadGmailMobileStory(_LoadGmailBaseStory): |
331 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 338 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
332 | 339 |
333 def _DidLoadDocument(self, action_runner): | 340 def _DidLoadDocument(self, action_runner): |
334 # Wait until the UI loads. | 341 # Wait until the UI loads. |
335 action_runner.WaitForElement('#apploadingdiv') | 342 action_runner.WaitForElement('#apploadingdiv') |
336 action_runner.WaitForJavaScriptCondition( | 343 action_runner.WaitForJavaScriptCondition( |
337 'document.getElementById("apploadingdiv").style.height === "0px"') | 344 'document.getElementById("apploadingdiv").style.height === "0px"') |
338 | 345 |
339 class LoadStackOverflowStory(_LoadingStory): | 346 class LoadStackOverflowStory(_LoadingStory): |
| 347 """Load a typical question & answer page of stackoverflow.com""" |
340 NAME = 'load:tools:stackoverflow' | 348 NAME = 'load:tools:stackoverflow' |
341 URL = ( | 349 URL = ( |
342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') | 350 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') |
343 | 351 |
344 | 352 |
345 class LoadDropboxStory(_LoadingStory): | 353 class LoadDropboxStory(_LoadingStory): |
346 NAME = 'load:tools:dropbox' | 354 NAME = 'load:tools:dropbox' |
347 URL = 'https://www.dropbox.com' | 355 URL = 'https://www.dropbox.com' |
348 | 356 |
349 def _Login(self, action_runner): | 357 def _Login(self, action_runner): |
(...skipping 15 matching lines...) Expand all Loading... |
365 google_login.LoginGoogleAccount(action_runner, 'googletest', | 373 google_login.LoginGoogleAccount(action_runner, 'googletest', |
366 self.credentials_path) | 374 self.credentials_path) |
367 | 375 |
368 | 376 |
369 ################################################################################ | 377 ################################################################################ |
370 # In-browser games (HTML5 and Flash). | 378 # In-browser games (HTML5 and Flash). |
371 ################################################################################ | 379 ################################################################################ |
372 | 380 |
373 | 381 |
374 class LoadBubblesStory(_LoadingStory): | 382 class LoadBubblesStory(_LoadingStory): |
| 383 """Load "smarty bubbles" game on famobi.com""" |
375 NAME = 'load:games:bubbles' | 384 NAME = 'load:games:bubbles' |
376 URL = ( | 385 URL = ( |
377 'https://games.cdn.famobi.com/html5games/s/smarty-bubbles/v010/?fg_domain=
play.famobi.com&fg_uid=d8f24956-dc91-4902-9096-a46cb1353b6f&fg_pid=4638e320-4444
-4514-81c4-d80a8c662371&fg_beat=620') | 386 'https://games.cdn.famobi.com/html5games/s/smarty-bubbles/v010/?fg_domain=
play.famobi.com&fg_uid=d8f24956-dc91-4902-9096-a46cb1353b6f&fg_pid=4638e320-4444
-4514-81c4-d80a8c662371&fg_beat=620') |
378 | 387 |
379 def _DidLoadDocument(self, action_runner): | 388 def _DidLoadDocument(self, action_runner): |
380 # The #logo element is removed right before the main menu is displayed. | 389 # The #logo element is removed right before the main menu is displayed. |
381 action_runner.WaitForJavaScriptCondition( | 390 action_runner.WaitForJavaScriptCondition( |
382 'document.getElementById("logo") === null') | 391 'document.getElementById("logo") === null') |
383 | 392 |
384 | 393 |
(...skipping 20 matching lines...) Expand all Loading... |
405 NAME = 'load:games:miniclip' | 414 NAME = 'load:games:miniclip' |
406 # Using "https://" causes "404 Not Found" during WPR recording. | 415 # Using "https://" causes "404 Not Found" during WPR recording. |
407 URL = 'http://www.miniclip.com/games/en/' | 416 URL = 'http://www.miniclip.com/games/en/' |
408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 417 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
409 | 418 |
410 | 419 |
411 class LoadAlphabettyStory(_LoadingStory): | 420 class LoadAlphabettyStory(_LoadingStory): |
412 NAME = 'load:games:alphabetty' | 421 NAME = 'load:games:alphabetty' |
413 URL = 'https://king.com/play/alphabetty' | 422 URL = 'https://king.com/play/alphabetty' |
414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 423 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
OLD | NEW |