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

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

Issue 2828403003: Remove less important system health mobile stories. (Closed)
Patch Set: Created 3 years, 8 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/loading_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 # encoding: utf-8 1 # encoding: utf-8
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from page_sets.system_health import platforms 6 from page_sets.system_health import platforms
7 from page_sets.system_health import story_tags 7 from page_sets.system_health import story_tags
8 from page_sets.system_health import system_health_story 8 from page_sets.system_health import system_health_story
9 9
10 from page_sets.login_helpers import pinterest_login 10 from page_sets.login_helpers import pinterest_login
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 139 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
140 TAGS = [story_tags.EMERGING_MARKET] 140 TAGS = [story_tags.EMERGING_MARKET]
141 141
142 def _WaitForNavigation(self, action_runner): 142 def _WaitForNavigation(self, action_runner):
143 action_runner.WaitForElement(text='load more comments') 143 action_runner.WaitForElement(text='load more comments')
144 144
145 def _NavigateBack(self, action_runner): 145 def _NavigateBack(self, action_runner):
146 action_runner.NavigateBack() 146 action_runner.NavigateBack()
147 147
148 148
149 class FlipboardMobileStory(_ArticleBrowsingStory):
150 NAME = 'browse:news:flipboard'
151 URL = 'https://flipboard.com/explore'
152 IS_SINGLE_PAGE_APP = True
153 ITEM_SELECTOR = '.grad-top'
154 ITEM_SCROLL_REPEAT = 4
155 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
156
157
158 class FlipboardDesktopStory(_ArticleBrowsingStory): 149 class FlipboardDesktopStory(_ArticleBrowsingStory):
159 NAME = 'browse:news:flipboard' 150 NAME = 'browse:news:flipboard'
160 URL = 'https://flipboard.com/explore' 151 URL = 'https://flipboard.com/explore'
161 IS_SINGLE_PAGE_APP = True 152 IS_SINGLE_PAGE_APP = True
162 ITEM_SELECTOR = '.cover-image' 153 ITEM_SELECTOR = '.cover-image'
163 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 154 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
164 155
165 156
166 # crbug.com/657665 for win and mac 157 # crbug.com/657665 for win and mac
167 @decorators.Disabled('win', 'mac') 158 @decorators.Disabled('win', 'mac')
168 class HackerNewsStory(_ArticleBrowsingStory): 159 class HackerNewsDesktopStory(_ArticleBrowsingStory):
169 NAME = 'browse:news:hackernews' 160 NAME = 'browse:news:hackernews'
170 URL = 'https://news.ycombinator.com' 161 URL = 'https://news.ycombinator.com'
171 ITEM_SELECTOR = '.athing .title > a' 162 ITEM_SELECTOR = '.athing .title > a'
172 163 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
173
174 class NytimesMobileStory(_ArticleBrowsingStory):
175 """The third top website in http://www.alexa.com/topsites/category/News"""
176 NAME = 'browse:news:nytimes'
177 URL = 'http://mobile.nytimes.com'
178 ITEM_SELECTOR = '.sfgAsset-link'
179 # Visiting more items causes OOM.
180 ITEMS_TO_VISIT = 2
181 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
182 164
183 165
184 class NytimesDesktopStory(_ArticleBrowsingStory): 166 class NytimesDesktopStory(_ArticleBrowsingStory):
185 """The third top website in http://www.alexa.com/topsites/category/News""" 167 """The third top website in http://www.alexa.com/topsites/category/News"""
186 NAME = 'browse:news:nytimes' 168 NAME = 'browse:news:nytimes'
187 URL = 'http://www.nytimes.com' 169 URL = 'http://www.nytimes.com'
188 ITEM_SELECTOR = '.story-heading > a' 170 ITEM_SELECTOR = '.story-heading > a'
189 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 171 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
190 172
191 173
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 # Reduce the speed (the current wpr is recorded with speed set to 50) when 761 # Reduce the speed (the current wpr is recorded with speed set to 50) when
780 # recording the wpr. If we scroll too fast, the data will not be recorded 762 # recording the wpr. If we scroll too fast, the data will not be recorded
781 # well. After recording reset it back to the original value to have a more 763 # well. After recording reset it back to the original value to have a more
782 # realistic scroll. 764 # realistic scroll.
783 action_runner.RepeatableBrowserDrivenScroll( 765 action_runner.RepeatableBrowserDrivenScroll(
784 x_scroll_distance_ratio = 0.0, y_scroll_distance_ratio = 1, 766 x_scroll_distance_ratio = 0.0, y_scroll_distance_ratio = 1,
785 repeat_count=3, speed=400, timeout=120) 767 repeat_count=3, speed=400, timeout=120)
786 action_runner.RepeatableBrowserDrivenScroll( 768 action_runner.RepeatableBrowserDrivenScroll(
787 x_scroll_distance_ratio = 1, y_scroll_distance_ratio = 0, 769 x_scroll_distance_ratio = 1, y_scroll_distance_ratio = 0,
788 repeat_count=3, speed=500, timeout=120) 770 repeat_count=3, speed=500, timeout=120)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/loading_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698