| OLD | NEW |
| 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 Loading... |
| 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 BrowserAvito(_LoadingStory): |
| 75 NAME = 'load:shopping:avito' |
| 76 URL = 'https://m.avito.ru/rossiya' |
| 77 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 78 TAGS = [story_tags.EMERGING_MARKET] |
| 79 |
| 80 |
| 81 class LoadOLX(_LoadingStory): |
| 82 NAME='load:shopping:olx' |
| 83 URL='http://m.olx.co.id' |
| 84 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 85 TAGS = [story_tags.EMERGING_MARKET] |
| 86 |
| 87 |
| 74 ################################################################################ | 88 ################################################################################ |
| 75 # Social networks. | 89 # Social networks. |
| 76 ################################################################################ | 90 ################################################################################ |
| 77 | 91 |
| 78 | 92 |
| 79 class LoadFacebookStory(_LoadingStory): | 93 class LoadFacebookStory(_LoadingStory): |
| 80 # Using Facebook login often causes "404 Not Found" with WPR. | 94 # Using Facebook login often causes "404 Not Found" with WPR. |
| 81 NAME = 'load:social:facebook' | 95 NAME = 'load:social:facebook' |
| 82 URL = 'https://www.facebook.com/rihanna' | 96 URL = 'https://www.facebook.com/rihanna' |
| 83 | 97 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 149 |
| 136 | 150 |
| 137 class LoadFlipboardStory(_LoadingStory): | 151 class LoadFlipboardStory(_LoadingStory): |
| 138 NAME = 'load:news:flipboard' | 152 NAME = 'load:news:flipboard' |
| 139 URL = 'https://flipboard.com/explore' | 153 URL = 'https://flipboard.com/explore' |
| 140 | 154 |
| 141 | 155 |
| 142 class LoadHackerNewsStory(_LoadingStory): | 156 class LoadHackerNewsStory(_LoadingStory): |
| 143 NAME = 'load:news:hackernews' | 157 NAME = 'load:news:hackernews' |
| 144 URL = 'https://news.ycombinator.com' | 158 URL = 'https://news.ycombinator.com' |
| 159 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 145 | 160 |
| 146 | 161 |
| 147 class LoadNytimesDesktopStory(_LoadingStory): | 162 class LoadNytimesDesktopStory(_LoadingStory): |
| 148 NAME = 'load:news:nytimes' | 163 NAME = 'load:news:nytimes' |
| 149 URL = 'http://www.nytimes.com' | 164 URL = 'http://www.nytimes.com' |
| 150 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 165 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 151 | 166 |
| 152 | 167 |
| 153 class LoadNytimesMobileStory(_LoadingStory): | 168 class LoadNytimesMobileStory(_LoadingStory): |
| 154 NAME = 'load:news:nytimes' | 169 NAME = 'load:news:nytimes' |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 has_button = action_runner.EvaluateJavaScript( | 216 has_button = action_runner.EvaluateJavaScript( |
| 202 '!!document.querySelector({{ selector }})', | 217 '!!document.querySelector({{ selector }})', |
| 203 selector=self._CLOSE_BUTTON_SELECTOR) | 218 selector=self._CLOSE_BUTTON_SELECTOR) |
| 204 if has_button: | 219 if has_button: |
| 205 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) | 220 action_runner.ClickElement(selector=self._CLOSE_BUTTON_SELECTOR) |
| 206 | 221 |
| 207 | 222 |
| 208 class LoadWikipediaStory(_LoadingStory): | 223 class LoadWikipediaStory(_LoadingStory): |
| 209 NAME = 'load:news:wikipedia' | 224 NAME = 'load:news:wikipedia' |
| 210 URL = 'https://en.wikipedia.org/wiki/Science' | 225 URL = 'https://en.wikipedia.org/wiki/Science' |
| 226 TAGS = [story_tags.EMERGING_MARKET] |
| 227 |
| 228 |
| 229 class LoadCricBuzz(_LoadingStory): |
| 230 NAME='load:news:cricbuzz' |
| 231 URL='http://m.cricbuzz.com' |
| 232 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 233 TAGS = [story_tags.EMERGING_MARKET] |
| 234 |
| 235 |
| 236 class LoadIrctc(_LoadingStory): |
| 237 NAME='load:news:irctc' |
| 238 URL='https://www.irctc.co.in' |
| 239 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 240 TAGS = [story_tags.EMERGING_MARKET] |
| 241 |
| 242 |
| 243 class LoadTOI(_LoadingStory): |
| 244 NAME='load:news:toi' |
| 245 URL='http://m.timesofindia.com' |
| 246 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 247 TAGS = [story_tags.EMERGING_MARKET] |
| 248 |
| 249 |
| 250 class LoadGlobo(_LoadingStory): |
| 251 NAME='load:news:globo' |
| 252 URL='http://www.globo.com/' |
| 253 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 254 TAGS = [story_tags.EMERGING_MARKET] |
| 255 |
| 256 |
| 257 class LoadPolymer(_LoadingStory): |
| 258 NAME='load:news:polymer' |
| 259 URL='https://polymer-news.appspot.com/' |
| 260 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 261 TAGS = [story_tags.EMERGING_MARKET] |
| 211 | 262 |
| 212 | 263 |
| 213 ################################################################################ | 264 ################################################################################ |
| 214 # Audio, images, and video. | 265 # Audio, images, and video. |
| 215 ################################################################################ | 266 ################################################################################ |
| 216 | 267 |
| 217 | 268 |
| 218 class LoadYouTubeStory(_LoadingStory): | 269 class LoadYouTubeStory(_LoadingStory): |
| 219 # No way to disable autoplay on desktop. | 270 # No way to disable autoplay on desktop. |
| 220 NAME = 'load:media:youtube' | 271 NAME = 'load:media:youtube' |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 @decorators.Disabled('android') # crbug.com/657433 | 375 @decorators.Disabled('android') # crbug.com/657433 |
| 325 class LoadGmailMobileStory(_LoadGmailBaseStory): | 376 class LoadGmailMobileStory(_LoadGmailBaseStory): |
| 326 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 377 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 327 | 378 |
| 328 def _DidLoadDocument(self, action_runner): | 379 def _DidLoadDocument(self, action_runner): |
| 329 # Wait until the UI loads. | 380 # Wait until the UI loads. |
| 330 action_runner.WaitForElement('#apploadingdiv') | 381 action_runner.WaitForElement('#apploadingdiv') |
| 331 action_runner.WaitForJavaScriptCondition( | 382 action_runner.WaitForJavaScriptCondition( |
| 332 'document.getElementById("apploadingdiv").style.height === "0px"') | 383 'document.getElementById("apploadingdiv").style.height === "0px"') |
| 333 | 384 |
| 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): | 385 class LoadStackOverflowStory(_LoadingStory): |
| 340 NAME = 'load:tools:stackoverflow' | 386 NAME = 'load:tools:stackoverflow' |
| 341 URL = ( | 387 URL = ( |
| 342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') | 388 'https://stackoverflow.com/questions/36827659/compiling-an-application-for
-use-in-highly-radioactive-environments') |
| 343 | 389 |
| 344 | 390 |
| 345 class LoadDropboxStory(_LoadingStory): | 391 class LoadDropboxStory(_LoadingStory): |
| 346 NAME = 'load:tools:dropbox' | 392 NAME = 'load:tools:dropbox' |
| 347 URL = 'https://www.dropbox.com' | 393 URL = 'https://www.dropbox.com' |
| 348 | 394 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 NAME = 'load:games:miniclip' | 451 NAME = 'load:games:miniclip' |
| 406 # Using "https://" causes "404 Not Found" during WPR recording. | 452 # Using "https://" causes "404 Not Found" during WPR recording. |
| 407 URL = 'http://www.miniclip.com/games/en/' | 453 URL = 'http://www.miniclip.com/games/en/' |
| 408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 454 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| 409 | 455 |
| 410 | 456 |
| 411 class LoadAlphabettyStory(_LoadingStory): | 457 class LoadAlphabettyStory(_LoadingStory): |
| 412 NAME = 'load:games:alphabetty' | 458 NAME = 'load:games:alphabetty' |
| 413 URL = 'https://king.com/play/alphabetty' | 459 URL = 'https://king.com/play/alphabetty' |
| 414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 460 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| OLD | NEW |