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

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

Issue 2787103003: Add System health stories for Emerging market (Closed)
Patch Set: Only add new stories. 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
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 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
(...skipping 21 matching lines...) Expand all
32 NAME = 'load:search:baidu' 32 NAME = 'load:search:baidu'
33 URL = 'https://www.baidu.com/s?word=google' 33 URL = 'https://www.baidu.com/s?word=google'
34 TAGS = [story_tags.INTERNATIONAL] 34 TAGS = [story_tags.INTERNATIONAL]
35 35
36 36
37 class LoadYahooStory(_LoadingStory): 37 class LoadYahooStory(_LoadingStory):
38 NAME = 'load:search:yahoo' 38 NAME = 'load:search:yahoo'
39 URL = 'https://search.yahoo.com/search;_ylt=?p=google' 39 URL = 'https://search.yahoo.com/search;_ylt=?p=google'
40 40
41 41
42 class LoadAmazonStory(_LoadingStory): 42 class LoadAmazonDesktopStory(_LoadingStory):
43 NAME = 'load:search:amazon' 43 NAME = 'load:search:amazon'
44 URL = 'https://www.amazon.com/s/?field-keywords=nexus' 44 URL = 'https://www.amazon.com/s/?field-keywords=nexus'
45 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
45 46
46 47
47 class LoadTaobaoDesktopStory(_LoadingStory): 48 class LoadTaobaoDesktopStory(_LoadingStory):
48 NAME = 'load:search:taobao' 49 NAME = 'load:search:taobao'
49 URL = 'https://world.taobao.com/' 50 URL = 'https://world.taobao.com/'
50 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 51 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
51 TAGS = [story_tags.INTERNATIONAL] 52 TAGS = [story_tags.INTERNATIONAL]
52 53
53 54
54 class LoadTaobaoMobileStory(_LoadingStory): 55 class LoadTaobaoMobileStory(_LoadingStory):
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 NAME = 'load:social:vk' 92 NAME = 'load:social:vk'
92 URL = 'https://vk.com/sbeatles' 93 URL = 'https://vk.com/sbeatles'
93 # Due to the deterministic date injected by WPR (February 2008), the cookie 94 # Due to the deterministic date injected by WPR (February 2008), the cookie
94 # set by https://vk.com immediately expires, so the page keeps refreshing 95 # set by https://vk.com immediately expires, so the page keeps refreshing
95 # indefinitely on mobile 96 # indefinitely on mobile
96 # (see https://github.com/chromium/web-page-replay/issues/71). 97 # (see https://github.com/chromium/web-page-replay/issues/71).
97 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 98 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
98 TAGS = [story_tags.INTERNATIONAL] 99 TAGS = [story_tags.INTERNATIONAL]
99 100
100 101
101 class LoadInstagramStory(_LoadingStory): 102 class LoadInstagramDesktopStory(_LoadingStory):
102 NAME = 'load:social:instagram' 103 NAME = 'load:social:instagram'
103 URL = 'https://www.instagram.com/selenagomez/' 104 URL = 'https://www.instagram.com/selenagomez/'
105 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
104 106
105 107
106 class LoadPinterestStory(_LoadingStory): 108 class LoadPinterestStory(_LoadingStory):
107 NAME = 'load:social:pinterest' 109 NAME = 'load:social:pinterest'
108 URL = 'https://uk.pinterest.com/categories/popular/' 110 URL = 'https://uk.pinterest.com/categories/popular/'
109 TAGS = [story_tags.JAVASCRIPT_HEAVY] 111 TAGS = [story_tags.JAVASCRIPT_HEAVY]
110 112
111 113
112 class LoadTumblrStory(_LoadingStory): 114 class LoadTumblrStory(_LoadingStory):
113 NAME = 'load:social:tumblr' 115 NAME = 'load:social:tumblr'
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 has_button = action_runner.EvaluateJavaScript( 203 has_button = action_runner.EvaluateJavaScript(
202 '!!document.querySelector({{ selector }})', 204 '!!document.querySelector({{ selector }})',
203 selector=self._CLOSE_BUTTON_SELECTOR) 205 selector=self._CLOSE_BUTTON_SELECTOR)
204 if has_button: 206 if has_button:
205 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) 207 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR)
206 208
207 209
208 class LoadWikipediaStory(_LoadingStory): 210 class LoadWikipediaStory(_LoadingStory):
209 NAME = 'load:news:wikipedia' 211 NAME = 'load:news:wikipedia'
210 URL = 'https://en.wikipedia.org/wiki/Science' 212 URL = 'https://en.wikipedia.org/wiki/Science'
213 TAGS = [story_tags.EMERGING_MARKET]
214
215
216 class LoadCricBuzzStory(_LoadingStory):
217 NAME = 'load:news:cricbuzz'
218 URL = 'http://m.cricbuzz.com'
219 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
220 TAGS = [story_tags.EMERGING_MARKET]
221
222
223 class LoadIrctcStory(_LoadingStory):
224 NAME = 'load:news:irctc'
225 URL = 'https://www.irctc.co.in'
226 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
227 TAGS = [story_tags.EMERGING_MARKET]
211 228
212 229
213 ################################################################################ 230 ################################################################################
214 # Audio, images, and video. 231 # Audio, images, and video.
215 ################################################################################ 232 ################################################################################
216 233
217 234
218 class LoadYouTubeStory(_LoadingStory): 235 class LoadYouTubeDesktopStory(_LoadingStory):
219 # No way to disable autoplay on desktop.
perezju 2017/04/11 09:43:35 nit: keep this comment?
ssid 2017/04/11 21:52:55 Done.
220 NAME = 'load:media:youtube' 236 NAME = 'load:media:youtube'
221 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' 237 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false'
222 PLATFORM_SPECIFIC = True 238 PLATFORM_SPECIFIC = True
239 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
223 240
224 241
225 class LoadDailymotionStory(_LoadingStory): 242 class LoadDailymotionStory(_LoadingStory):
226 # The side panel with related videos doesn't show on desktop due to 243 # The side panel with related videos doesn't show on desktop due to
227 # https://github.com/chromium/web-page-replay/issues/74. 244 # https://github.com/chromium/web-page-replay/issues/74.
228 NAME = 'load:media:dailymotion' 245 NAME = 'load:media:dailymotion'
229 URL = ( 246 URL = (
230 'https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slin ky-skills_fun?autoplay=false') 247 'https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slin ky-skills_fun?autoplay=false')
231 248
232 249
(...skipping 29 matching lines...) Expand all
262 class LoadImgurStory(_LoadingStory): 279 class LoadImgurStory(_LoadingStory):
263 NAME = 'load:media:imgur' 280 NAME = 'load:media:imgur'
264 URL = 'http://imgur.com/gallery/5UlBN' 281 URL = 'http://imgur.com/gallery/5UlBN'
265 282
266 283
267 class LoadFacebookPhotosMobileStory(_LoadingStory): 284 class LoadFacebookPhotosMobileStory(_LoadingStory):
268 NAME = 'load:media:facebook_photos' 285 NAME = 'load:media:facebook_photos'
269 URL = ( 286 URL = (
270 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1 0153911739606676/?type=3&source=54&ref=page_internal') 287 'https://m.facebook.com/rihanna/photos/a.207477806675.138795.10092511675/1 0153911739606676/?type=3&source=54&ref=page_internal')
271 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 288 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
289 TAGS = [story_tags.EMERGING_MARKET]
272 290
273 291
274 class LoadFacebookPhotosDesktopStory(_LoadingStory): 292 class LoadFacebookPhotosDesktopStory(_LoadingStory):
275 NAME = 'load:media:facebook_photos' 293 NAME = 'load:media:facebook_photos'
276 URL = ( 294 URL = (
277 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675 /10153911739606676/?type=3&theater') 295 'https://www.facebook.com/rihanna/photos/a.207477806675.138795.10092511675 /10153911739606676/?type=3&theater')
278 # Recording currently does not work. The page gets stuck in the 296 # Recording currently does not work. The page gets stuck in the
279 # theater viewer. 297 # theater viewer.
280 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS 298 SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS
281 299
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 @decorators.Disabled('android') # crbug.com/657433 342 @decorators.Disabled('android') # crbug.com/657433
325 class LoadGmailMobileStory(_LoadGmailBaseStory): 343 class LoadGmailMobileStory(_LoadGmailBaseStory):
326 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 344 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
327 345
328 def _DidLoadDocument(self, action_runner): 346 def _DidLoadDocument(self, action_runner):
329 # Wait until the UI loads. 347 # Wait until the UI loads.
330 action_runner.WaitForElement('#apploadingdiv') 348 action_runner.WaitForElement('#apploadingdiv')
331 action_runner.WaitForJavaScriptCondition( 349 action_runner.WaitForJavaScriptCondition(
332 'document.getElementById("apploadingdiv").style.height === "0px"') 350 'document.getElementById("apploadingdiv").style.height === "0px"')
333 351
334 class LoadMapsStory(_LoadingStory):
335 NAME = 'load:tools:maps'
336 URL = 'https://www.google.com/maps/place/London,+UK/'
337
338
339 class LoadStackOverflowStory(_LoadingStory): 352 class LoadStackOverflowStory(_LoadingStory):
340 NAME = 'load:tools:stackoverflow' 353 NAME = 'load:tools:stackoverflow'
341 URL = ( 354 URL = (
342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments') 355 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments')
343 356
344 357
345 class LoadDropboxStory(_LoadingStory): 358 class LoadDropboxStory(_LoadingStory):
346 NAME = 'load:tools:dropbox' 359 NAME = 'load:tools:dropbox'
347 URL = 'https://www.dropbox.com' 360 URL = 'https://www.dropbox.com'
348 361
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 NAME = 'load:games:miniclip' 418 NAME = 'load:games:miniclip'
406 # Using "https://" causes "404 Not Found" during WPR recording. 419 # Using "https://" causes "404 Not Found" during WPR recording.
407 URL = 'http://www.miniclip.com/games/en/' 420 URL = 'http://www.miniclip.com/games/en/'
408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. 421 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash.
409 422
410 423
411 class LoadAlphabettyStory(_LoadingStory): 424 class LoadAlphabettyStory(_LoadingStory):
412 NAME = 'load:games:alphabetty' 425 NAME = 'load:games:alphabetty'
413 URL = 'https://king.com/play/alphabetty' 426 URL = 'https://king.com/play/alphabetty'
414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. 427 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698