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

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: 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 URL = 'https://yandex.ru/touchsearch?text=science' 64 URL = 'https://yandex.ru/touchsearch?text=science'
65 TAGS = [story_tags.INTERNATIONAL] 65 TAGS = [story_tags.INTERNATIONAL]
66 66
67 67
68 class LoadEbayStory(_LoadingStory): 68 class LoadEbayStory(_LoadingStory):
69 NAME = 'load:search:ebay' 69 NAME = 'load:search:ebay'
70 # Redirects to the "http://" version. 70 # Redirects to the "http://" version.
71 URL = 'https://www.ebay.com/sch/i.html?_nkw=headphones' 71 URL = 'https://www.ebay.com/sch/i.html?_nkw=headphones'
72 72
73 73
74 class LoadAvito(_LoadingStory):
75 NAME='load:shopping:avito'
76 URL='https://m.avito.ru/'
77 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
perezju 2017/03/31 08:45:54 We actually want to move away (as much as possible
ssid 2017/04/04 03:43:48 Moved a few stories. Thanks! Some of these don't f
78
79
80 class LoadFlipkart(_LoadingStory):
81 NAME='load:shopping:flipkart'
82 URL='https://flipkart.com'
83 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
84
85
86 class LoadLazada(_LoadingStory):
87 NAME='load:shopping:lazada'
88 URL='http://www.lazada.co.id'
89 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
90
91
92 class LoadOLX(_LoadingStory):
93 NAME='load:shopping:olx'
94 URL='http://m.olx.co.id'
95 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
96
97
74 ################################################################################ 98 ################################################################################
75 # Social networks. 99 # Social networks.
76 ################################################################################ 100 ################################################################################
77 101
78 102
79 class LoadFacebookStory(_LoadingStory): 103 class LoadFacebookStory(_LoadingStory):
80 # Using Facebook login often causes "404 Not Found" with WPR. 104 # Using Facebook login often causes "404 Not Found" with WPR.
81 NAME = 'load:social:facebook' 105 NAME = 'load:social:facebook'
82 URL = 'https://www.facebook.com/rihanna' 106 URL = 'https://www.facebook.com/rihanna'
83 107
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 159
136 160
137 class LoadFlipboardStory(_LoadingStory): 161 class LoadFlipboardStory(_LoadingStory):
138 NAME = 'load:news:flipboard' 162 NAME = 'load:news:flipboard'
139 URL = 'https://flipboard.com/explore' 163 URL = 'https://flipboard.com/explore'
140 164
141 165
142 class LoadHackerNewsStory(_LoadingStory): 166 class LoadHackerNewsStory(_LoadingStory):
143 NAME = 'load:news:hackernews' 167 NAME = 'load:news:hackernews'
144 URL = 'https://news.ycombinator.com' 168 URL = 'https://news.ycombinator.com'
169 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
145 170
146 171
147 class LoadNytimesDesktopStory(_LoadingStory): 172 class LoadNytimesDesktopStory(_LoadingStory):
148 NAME = 'load:news:nytimes' 173 NAME = 'load:news:nytimes'
149 URL = 'http://www.nytimes.com' 174 URL = 'http://www.nytimes.com'
150 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY 175 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
151 176
152 177
153 class LoadNytimesMobileStory(_LoadingStory): 178 class LoadNytimesMobileStory(_LoadingStory):
154 NAME = 'load:news:nytimes' 179 NAME = 'load:news:nytimes'
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 selector=self._CLOSE_BUTTON_SELECTOR) 228 selector=self._CLOSE_BUTTON_SELECTOR)
204 if has_button: 229 if has_button:
205 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) 230 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR)
206 231
207 232
208 class LoadWikipediaStory(_LoadingStory): 233 class LoadWikipediaStory(_LoadingStory):
209 NAME = 'load:news:wikipedia' 234 NAME = 'load:news:wikipedia'
210 URL = 'https://en.wikipedia.org/wiki/Science' 235 URL = 'https://en.wikipedia.org/wiki/Science'
211 236
212 237
238 class LoadCricBuzz(_LoadingStory):
239 NAME='load:news:cricbuzz'
240 URL='http://m.cricbuzz.com'
241 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
242
243
244 class LoadIrctc(_LoadingStory):
245 NAME='load:news:irctc'
246 URL='https://www.irctc.co.in'
247 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
248
249
250 class LoadTOI(_LoadingStory):
251 NAME='load:news:toi'
252 URL='http://m.timesofindia.com'
253 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
254
255
256 class LoadGlobo(_LoadingStory):
257 NAME='load:news:globo'
258 URL='http://www.globo.com/'
259 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
260
261
262 class LoadPolymer(_LoadingStory):
263 NAME='load:news:polymer'
264 URL='https://polymer-news.appspot.com/'
265 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
266
267
213 ################################################################################ 268 ################################################################################
214 # Audio, images, and video. 269 # Audio, images, and video.
215 ################################################################################ 270 ################################################################################
216 271
217 272
218 class LoadYouTubeStory(_LoadingStory): 273 class LoadYouTubeStory(_LoadingStory):
219 # No way to disable autoplay on desktop. 274 # No way to disable autoplay on desktop.
220 NAME = 'load:media:youtube' 275 NAME = 'load:media:youtube'
221 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' 276 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false'
222 PLATFORM_SPECIFIC = True 277 PLATFORM_SPECIFIC = True
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 @decorators.Disabled('android') # crbug.com/657433 379 @decorators.Disabled('android') # crbug.com/657433
325 class LoadGmailMobileStory(_LoadGmailBaseStory): 380 class LoadGmailMobileStory(_LoadGmailBaseStory):
326 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY 381 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
327 382
328 def _DidLoadDocument(self, action_runner): 383 def _DidLoadDocument(self, action_runner):
329 # Wait until the UI loads. 384 # Wait until the UI loads.
330 action_runner.WaitForElement('#apploadingdiv') 385 action_runner.WaitForElement('#apploadingdiv')
331 action_runner.WaitForJavaScriptCondition( 386 action_runner.WaitForJavaScriptCondition(
332 'document.getElementById("apploadingdiv").style.height === "0px"') 387 'document.getElementById("apploadingdiv").style.height === "0px"')
333 388
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): 389 class LoadStackOverflowStory(_LoadingStory):
340 NAME = 'load:tools:stackoverflow' 390 NAME = 'load:tools:stackoverflow'
341 URL = ( 391 URL = (
342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments') 392 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments')
343 393
344 394
345 class LoadDropboxStory(_LoadingStory): 395 class LoadDropboxStory(_LoadingStory):
346 NAME = 'load:tools:dropbox' 396 NAME = 'load:tools:dropbox'
347 URL = 'https://www.dropbox.com' 397 URL = 'https://www.dropbox.com'
348 398
(...skipping 10 matching lines...) Expand all
359 class LoadDriveStory(_LoadingStory): 409 class LoadDriveStory(_LoadingStory):
360 NAME = 'load:tools:drive' 410 NAME = 'load:tools:drive'
361 URL = 'https://drive.google.com/drive/my-drive' 411 URL = 'https://drive.google.com/drive/my-drive'
362 TAGS = [story_tags.JAVASCRIPT_HEAVY] 412 TAGS = [story_tags.JAVASCRIPT_HEAVY]
363 413
364 def _Login(self, action_runner): 414 def _Login(self, action_runner):
365 google_login.LoginGoogleAccount(action_runner, 'googletest', 415 google_login.LoginGoogleAccount(action_runner, 'googletest',
366 self.credentials_path) 416 self.credentials_path)
367 417
368 418
419 class LoadMapsDesktopStory(_LoadingStory):
420 NAME = 'load:tools:maps'
421 URL='https://maps.google.co.in/'
422 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY
423
424
425 class LoadMapsMobileStory(_LoadingStory):
426 NAME = 'load:tools:maps'
427 URL='https://maps.google.co.in/'
428
429 def RunPageInteractions(self, action_runner):
430 action_runner.WaitForElement(selector='[id="ml-map"]')
431 action_runner.DragPage(left_start_ratio=0.3, top_start_ratio=0.3,
432 left_end_ratio=0.7, top_end_ratio=0.7,
433 use_touch=True)
434 action_runner.Wait(1)
nednguyen 2017/03/31 09:00:16 One thing about these wait is if the page misbehav
ssid 2017/04/04 03:43:48 I actually added these waits as a user behavior ra
perezju 2017/04/04 09:23:38 I would suggest to add some comments to any remain
435 action_runner.PinchPage()
436 action_runner.Wait(1)
437 action_runner.SwipePage()
438 action_runner.Wait(1)
439
440 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
441
442
369 ################################################################################ 443 ################################################################################
370 # In-browser games (HTML5 and Flash). 444 # In-browser games (HTML5 and Flash).
371 ################################################################################ 445 ################################################################################
372 446
373 447
374 class LoadBubblesStory(_LoadingStory): 448 class LoadBubblesStory(_LoadingStory):
375 NAME = 'load:games:bubbles' 449 NAME = 'load:games:bubbles'
376 URL = ( 450 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') 451 '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 452
(...skipping 26 matching lines...) Expand all
405 NAME = 'load:games:miniclip' 479 NAME = 'load:games:miniclip'
406 # Using "https://" causes "404 Not Found" during WPR recording. 480 # Using "https://" causes "404 Not Found" during WPR recording.
407 URL = 'http://www.miniclip.com/games/en/' 481 URL = 'http://www.miniclip.com/games/en/'
408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. 482 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash.
409 483
410 484
411 class LoadAlphabettyStory(_LoadingStory): 485 class LoadAlphabettyStory(_LoadingStory):
412 NAME = 'load:games:alphabetty' 486 NAME = 'load:games:alphabetty'
413 URL = 'https://king.com/play/alphabetty' 487 URL = 'https://king.com/play/alphabetty'
414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. 488 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698