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 21 matching lines...) Expand all Loading... | |
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 | 45 |
46 | 46 |
47 class LoadTaobaoDesktopStory(_LoadingStory): | 47 class LoadTaobaoDesktopStory(_LoadingStory): |
48 NAME = 'load:search:taobao' | 48 NAME = 'load:search:taobao' |
49 URL = 'https://world.taobao.com/' | 49 URL = 'https://world.taobao.com/' |
50 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 50 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
51 TAGS = [story_tags.INTERNATIONAL] | 51 TAGS = [story_tags.INTERNATIONAL] |
52 | 52 |
(...skipping 11 matching lines...) Expand all 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 LoadAvitoStory(_LoadingStory): | |
75 NAME = 'load:shopping:avito' | |
perezju
2017/04/10 10:13:56
As suggested on the doc, I propose *not* to add lo
ssid
2017/04/11 03:55:57
Done.
| |
76 URL = 'https://m.avito.ru/rossiya' | |
77 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
78 TAGS = [story_tags.EMERGING_MARKET] | |
79 | |
80 | |
81 class LoadOLXStory(_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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 # Using "https://" shows "Your connection is not private". | 146 # Using "https://" shows "Your connection is not private". |
133 URL = 'http://edition.cnn.com' | 147 URL = 'http://edition.cnn.com' |
134 TAGS = [story_tags.JAVASCRIPT_HEAVY] | 148 TAGS = [story_tags.JAVASCRIPT_HEAVY] |
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 LoadHackerNewsDesktopStory(_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 | |
perezju
2017/04/10 10:13:56
I thought you were not going to remove stories now
ssid
2017/04/11 03:55:57
Sorry, this was error.
| |
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 LoadCricBuzzStory(_LoadingStory): | |
230 NAME = 'load:news:cricbuzz' | |
perezju
2017/04/10 10:13:56
Similarly, do not add more load news stories.
But
ssid
2017/04/11 03:55:57
I do not know how else i can add these stories. I
| |
231 URL = 'http://m.cricbuzz.com' | |
232 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
233 TAGS = [story_tags.EMERGING_MARKET] | |
234 | |
235 | |
236 class LoadIrctcStory(_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 LoadGloboStory(_LoadingStory): | |
244 NAME = 'load:news:globo' | |
245 URL = 'http://www.globo.com/' | |
246 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
247 TAGS = [story_tags.EMERGING_MARKET] | |
248 | |
249 | |
250 class LoadPolymerStory(_LoadingStory): | |
251 NAME = 'load:news:polymer' | |
252 URL = 'https://polymer-news.appspot.com/' | |
253 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | |
254 TAGS = [story_tags.EMERGING_MARKET] | |
211 | 255 |
212 | 256 |
213 ################################################################################ | 257 ################################################################################ |
214 # Audio, images, and video. | 258 # Audio, images, and video. |
215 ################################################################################ | 259 ################################################################################ |
216 | 260 |
217 | 261 |
218 class LoadYouTubeStory(_LoadingStory): | 262 class LoadYouTubeStory(_LoadingStory): |
219 # No way to disable autoplay on desktop. | 263 # No way to disable autoplay on desktop. |
220 NAME = 'load:media:youtube' | 264 NAME = 'load:media:youtube' |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 @decorators.Disabled('android') # crbug.com/657433 | 368 @decorators.Disabled('android') # crbug.com/657433 |
325 class LoadGmailMobileStory(_LoadGmailBaseStory): | 369 class LoadGmailMobileStory(_LoadGmailBaseStory): |
326 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 370 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
327 | 371 |
328 def _DidLoadDocument(self, action_runner): | 372 def _DidLoadDocument(self, action_runner): |
329 # Wait until the UI loads. | 373 # Wait until the UI loads. |
330 action_runner.WaitForElement('#apploadingdiv') | 374 action_runner.WaitForElement('#apploadingdiv') |
331 action_runner.WaitForJavaScriptCondition( | 375 action_runner.WaitForJavaScriptCondition( |
332 'document.getElementById("apploadingdiv").style.height === "0px"') | 376 'document.getElementById("apploadingdiv").style.height === "0px"') |
333 | 377 |
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): | 378 class LoadStackOverflowStory(_LoadingStory): |
340 NAME = 'load:tools:stackoverflow' | 379 NAME = 'load:tools:stackoverflow' |
341 URL = ( | 380 URL = ( |
342 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments') | 381 'https://stackoverflow.com/questions/36827659/compiling-an-application-for -use-in-highly-radioactive-environments') |
343 | 382 |
344 | 383 |
345 class LoadDropboxStory(_LoadingStory): | 384 class LoadDropboxStory(_LoadingStory): |
346 NAME = 'load:tools:dropbox' | 385 NAME = 'load:tools:dropbox' |
347 URL = 'https://www.dropbox.com' | 386 URL = 'https://www.dropbox.com' |
348 | 387 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 NAME = 'load:games:miniclip' | 444 NAME = 'load:games:miniclip' |
406 # Using "https://" causes "404 Not Found" during WPR recording. | 445 # Using "https://" causes "404 Not Found" during WPR recording. |
407 URL = 'http://www.miniclip.com/games/en/' | 446 URL = 'http://www.miniclip.com/games/en/' |
408 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 447 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
409 | 448 |
410 | 449 |
411 class LoadAlphabettyStory(_LoadingStory): | 450 class LoadAlphabettyStory(_LoadingStory): |
412 NAME = 'load:games:alphabetty' | 451 NAME = 'load:games:alphabetty' |
413 URL = 'https://king.com/play/alphabetty' | 452 URL = 'https://king.com/play/alphabetty' |
414 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. | 453 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY # Requires Flash. |
OLD | NEW |