Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: tools/perf/page_sets/system_health/background_stories.py

Issue 2386083003: Add background stories to MobileSystemHealth (Closed)
Patch Set: remove wait Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 from page_sets.system_health import platforms
6 from page_sets.system_health import system_health_story
7
8 class _BackgroundStory(system_health_story.SystemHealthStory):
9 """Abstract base class for background stories
10
11 As in _LoadingStory except it puts the browser into the
12 background before measuring.
13 """
14 ABSTRACT_STORY = True
15 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
16
17 def _Measure(self, action_runner):
18 action_runner.tab.browser.Background()
19 super(_BackgroundStory, self)._Measure(action_runner)
20
21
22 class BackgroundGoogleStory(_BackgroundStory):
23 NAME = 'background:search:google'
24 URL = 'https://www.google.co.uk/'
nednguyen 2016/10/05 15:15:22 Can you change this to https://www.google.co.uk/#q
hjd 2016/10/06 11:23:41 Done :)
25
26
27 class BackgroundFacebookMobileStory(_BackgroundStory):
28 NAME = 'background:social:facebook'
29 URL = 'https://www.facebook.com/rihanna'
30 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
31
32
33 class BackgroundNytimesMobileStory(_BackgroundStory):
34 """The third top website in http://www.alexa.com/topsites/category/News"""
35 NAME = 'background:news:nytimes'
36 URL = 'http://mobile.nytimes.com'
nednguyen 2016/10/05 15:15:23 Can you use http://www.nytimes.com/2016/10/04/us/p
hjd 2016/10/06 11:23:41 Done.
37 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
38
39
40 class BackgroundImgurMobileStory(_BackgroundStory):
41 NAME = 'background:media:imgur'
42 URL = 'http://imgur.com/gallery/5UlBN'
nednguyen 2016/10/05 15:15:22 How about using http://imgur.com/gallery/hUita ?
hjd 2016/10/06 11:23:41 Done.
43 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698