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

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

Issue 2693973002: Add Javascript-Heavy tags for system health stories with heavy uses of JS (Closed)
Patch Set: Rebase Created 3 years, 10 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 | tools/perf/page_sets/system_health/browsing_stories.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 system_health_story 7 from page_sets.system_health import system_health_story
7 from page_sets.system_health.loading_stories import LoadGmailMobileStory 8 from page_sets.system_health.loading_stories import LoadGmailMobileStory
8 9
9 from telemetry import decorators 10 from telemetry import decorators
10 11
11 _WAIT_FOR_VIDEO_SECONDS = 5 12 _WAIT_FOR_VIDEO_SECONDS = 5
12 13
13 class _BackgroundStory(system_health_story.SystemHealthStory): 14 class _BackgroundStory(system_health_story.SystemHealthStory):
14 """Abstract base class for background stories 15 """Abstract base class for background stories
15 16
(...skipping 23 matching lines...) Expand all
39 NAME = 'background:social:facebook' 40 NAME = 'background:social:facebook'
40 URL = 'https://www.facebook.com/rihanna' 41 URL = 'https://www.facebook.com/rihanna'
41 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 42 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
42 43
43 44
44 class BackgroundNytimesMobileStory(_BackgroundStory): 45 class BackgroundNytimesMobileStory(_BackgroundStory):
45 """The third top website in http://www.alexa.com/topsites/category/News""" 46 """The third top website in http://www.alexa.com/topsites/category/News"""
46 NAME = 'background:news:nytimes' 47 NAME = 'background:news:nytimes'
47 URL = 'http://www.nytimes.com/2016/10/04/us/politics/vice-presidential-debate. html?_r=0' 48 URL = 'http://www.nytimes.com/2016/10/04/us/politics/vice-presidential-debate. html?_r=0'
48 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 49 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
50 TAGS = [story_tags.JAVASCRIPT_HEAVY]
49 51
50 def _DidLoadDocument(self, action_runner): 52 def _DidLoadDocument(self, action_runner):
51 # Dismiss the 'You have n free articles' message. 53 # Dismiss the 'You have n free articles' message.
52 action_runner.WaitForElement(selector='.growl-dismiss') 54 action_runner.WaitForElement(selector='.growl-dismiss')
53 action_runner.TapElement(selector='.growl-dismiss') 55 action_runner.TapElement(selector='.growl-dismiss')
54 56
55 # Tap the 'Show Full Article' button. 57 # Tap the 'Show Full Article' button.
56 action_runner.WaitForElement(selector='#additional-content button') 58 action_runner.WaitForElement(selector='#additional-content button')
57 action_runner.ScrollPageToElement(selector='#additional-content button') 59 action_runner.ScrollPageToElement(selector='#additional-content button')
58 # TapElement seems flaky here so use JavaScript instead. 60 # TapElement seems flaky here so use JavaScript instead.
(...skipping 20 matching lines...) Expand all
79 81
80 82
81 @decorators.Disabled('android') # crbug.com/676336 83 @decorators.Disabled('android') # crbug.com/676336
82 class BackgroundGmailMobileStory(LoadGmailMobileStory): 84 class BackgroundGmailMobileStory(LoadGmailMobileStory):
83 NAME = 'background:tools:gmail' 85 NAME = 'background:tools:gmail'
84 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 86 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
85 87
86 def _Measure(self, action_runner): 88 def _Measure(self, action_runner):
87 action_runner.tab.browser.Background() 89 action_runner.tab.browser.Background()
88 super(BackgroundGmailMobileStory, self)._Measure(action_runner) 90 super(BackgroundGmailMobileStory, self)._Measure(action_runner)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/browsing_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698