| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 # Redirects to the "http://" version. | 116 # Redirects to the "http://" version. |
| 117 URL = 'https://50thousand.tumblr.com/' | 117 URL = 'https://50thousand.tumblr.com/' |
| 118 TAGS = [story_tags.JAVASCRIPT_HEAVY] | 118 TAGS = [story_tags.JAVASCRIPT_HEAVY] |
| 119 | 119 |
| 120 | 120 |
| 121 ################################################################################ | 121 ################################################################################ |
| 122 # News, discussion and knowledge portals and blogs. | 122 # News, discussion and knowledge portals and blogs. |
| 123 ################################################################################ | 123 ################################################################################ |
| 124 | 124 |
| 125 | 125 |
| 126 class LoadBbcStory(_LoadingStory): | 126 class LoadBbcDesktopStory(_LoadingStory): |
| 127 NAME = 'load:news:bbc' | 127 NAME = 'load:news:bbc' |
| 128 # Redirects to the "http://" version. | 128 # Redirects to the "http://" version. |
| 129 URL = 'https://www.bbc.co.uk/news/world-asia-china-36189636' | 129 URL = 'https://www.bbc.co.uk/news/world-asia-china-36189636' |
| 130 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 130 | 131 |
| 131 | 132 |
| 132 class LoadCnnStory(_LoadingStory): | 133 class LoadCnnStory(_LoadingStory): |
| 133 NAME = 'load:news:cnn' | 134 NAME = 'load:news:cnn' |
| 134 # Using "https://" shows "Your connection is not private". | 135 # Using "https://" shows "Your connection is not private". |
| 135 URL = 'http://edition.cnn.com' | 136 URL = 'http://edition.cnn.com' |
| 136 TAGS = [story_tags.JAVASCRIPT_HEAVY] | 137 TAGS = [story_tags.JAVASCRIPT_HEAVY] |
| 137 | 138 |
| 138 | 139 |
| 139 class LoadFlipboardStory(_LoadingStory): | 140 class LoadFlipboardDesktopStory(_LoadingStory): |
| 140 NAME = 'load:news:flipboard' | 141 NAME = 'load:news:flipboard' |
| 141 URL = 'https://flipboard.com/explore' | 142 URL = 'https://flipboard.com/explore' |
| 143 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 142 | 144 |
| 143 | 145 |
| 144 class LoadHackerNewsStory(_LoadingStory): | 146 class LoadHackerNewsDesktopStory(_LoadingStory): |
| 145 NAME = 'load:news:hackernews' | 147 NAME = 'load:news:hackernews' |
| 146 URL = 'https://news.ycombinator.com' | 148 URL = 'https://news.ycombinator.com' |
| 149 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 147 | 150 |
| 148 | 151 |
| 149 class LoadNytimesDesktopStory(_LoadingStory): | 152 class LoadNytimesDesktopStory(_LoadingStory): |
| 150 NAME = 'load:news:nytimes' | 153 NAME = 'load:news:nytimes' |
| 151 URL = 'http://www.nytimes.com' | 154 URL = 'http://www.nytimes.com' |
| 152 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 155 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 153 | 156 |
| 154 | 157 |
| 155 class LoadNytimesMobileStory(_LoadingStory): | 158 class LoadNytimesMobileStory(_LoadingStory): |
| 156 NAME = 'load:news:nytimes' | 159 NAME = 'load:news:nytimes' |
| (...skipping 13 matching lines...) Expand all Loading... |
| 170 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' | 173 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' |
| 171 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 174 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 172 | 175 |
| 173 | 176 |
| 174 class LoadRedditMobileStory(_LoadingStory): | 177 class LoadRedditMobileStory(_LoadingStory): |
| 175 NAME = 'load:news:reddit' | 178 NAME = 'load:news:reddit' |
| 176 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' | 179 URL = 'https://www.reddit.com/r/news/top/?sort=top&t=week' |
| 177 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 180 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 178 | 181 |
| 179 | 182 |
| 180 class LoadSohuMobileStory(_LoadingStory): | |
| 181 NAME = 'load:news:sohu' | |
| 182 # Using "https://" leads to missing images and scripts on mobile (due to | |
| 183 # mixed content). | |
| 184 URL = 'http://m.sohu.com/n/447433356/' | |
| 185 # The desktop page (http://news.sohu.com/20160503/n447433356.shtml) almost | |
| 186 # always fails to completely load due to | |
| 187 # https://github.com/chromium/web-page-replay/issues/74. | |
| 188 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
| 189 TAGS = [story_tags.INTERNATIONAL] | |
| 190 | |
| 191 | |
| 192 class LoadWashingtonPostMobileStory(_LoadingStory): | 183 class LoadWashingtonPostMobileStory(_LoadingStory): |
| 193 NAME = 'load:news:washingtonpost' | 184 NAME = 'load:news:washingtonpost' |
| 194 URL = 'https://www.washingtonpost.com/pwa' | 185 URL = 'https://www.washingtonpost.com/pwa' |
| 195 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 186 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 196 _CLOSE_BUTTON_SELECTOR = '.close' | 187 _CLOSE_BUTTON_SELECTOR = '.close' |
| 197 | 188 |
| 198 def _DidLoadDocument(self, action_runner): | 189 def _DidLoadDocument(self, action_runner): |
| 199 # Close the popup window. On Nexus 9 (and probably other tables) the popup | 190 # Close the popup window. On Nexus 9 (and probably other tables) the popup |
| 200 # window does not have a "Close" button, instead it has only a "Send link | 191 # window does not have a "Close" button, instead it has only a "Send link |
| 201 # to phone" button. So on tablets we run with the popup window open. The | 192 # to phone" button. So on tablets we run with the popup window open. The |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 URL = 'https://www.google.co.uk/search?tbm=isch&q=love' | 237 URL = 'https://www.google.co.uk/search?tbm=isch&q=love' |
| 247 | 238 |
| 248 | 239 |
| 249 class LoadSoundCloudStory(_LoadingStory): | 240 class LoadSoundCloudStory(_LoadingStory): |
| 250 # No way to disable autoplay on desktop. Album artwork doesn't load due to | 241 # No way to disable autoplay on desktop. Album artwork doesn't load due to |
| 251 # https://github.com/chromium/web-page-replay/issues/73. | 242 # https://github.com/chromium/web-page-replay/issues/73. |
| 252 NAME = 'load:media:soundcloud' | 243 NAME = 'load:media:soundcloud' |
| 253 URL = 'https://soundcloud.com/lifeofdesiigner/desiigner-panda' | 244 URL = 'https://soundcloud.com/lifeofdesiigner/desiigner-panda' |
| 254 | 245 |
| 255 | 246 |
| 256 class Load9GagStory(_LoadingStory): | 247 class Load9GagDesktopStory(_LoadingStory): |
| 257 NAME = 'load:media:9gag' | 248 NAME = 'load:media:9gag' |
| 258 URL = 'https://www.9gag.com/' | 249 URL = 'https://www.9gag.com/' |
| 250 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 259 | 251 |
| 260 | 252 |
| 261 class LoadFlickrStory(_LoadingStory): | 253 class LoadFlickrDesktopStory(_LoadingStory): |
| 262 NAME = 'load:media:flickr' | 254 NAME = 'load:media:flickr' |
| 263 URL = 'https://www.flickr.com/photos/tags/farm' | 255 URL = 'https://www.flickr.com/photos/tags/farm' |
| 256 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 264 | 257 |
| 265 def _DidLoadDocument(self, action_runner): | 258 def _DidLoadDocument(self, action_runner): |
| 266 # Wait until the 'Recently tagged' view loads. | 259 # Wait until the 'Recently tagged' view loads. |
| 267 action_runner.WaitForJavaScriptCondition(''' | 260 action_runner.WaitForJavaScriptCondition(''' |
| 268 document.querySelector( | 261 document.querySelector( |
| 269 '.search-photos-everyone-trending-view .photo-list-view') | 262 '.search-photos-everyone-trending-view .photo-list-view') |
| 270 !== null''') | 263 !== null''') |
| 271 | 264 |
| 272 | 265 |
| 273 class LoadImgurStory(_LoadingStory): | 266 class LoadImgurStory(_LoadingStory): |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 NAME = 'load:games:miniclip' | 405 NAME = 'load:games:miniclip' |
| 413 # Using "https://" causes "404 Not Found" during WPR recording. | 406 # Using "https://" causes "404 Not Found" during WPR recording. |
| 414 URL = 'http://www.miniclip.com/games/en/' | 407 URL = 'http://www.miniclip.com/games/en/' |
| 415 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| 416 | 409 |
| 417 | 410 |
| 418 class LoadAlphabettyStory(_LoadingStory): | 411 class LoadAlphabettyStory(_LoadingStory): |
| 419 NAME = 'load:games:alphabetty' | 412 NAME = 'load:games:alphabetty' |
| 420 URL = 'https://king.com/play/alphabetty' | 413 URL = 'https://king.com/play/alphabetty' |
| 421 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
| OLD | NEW |