1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 from telemetry
.page
import page
as page_module
5 from telemetry
import story
8 class KeyDesktopSitesPage(page_module
.Page
):
10 def __init__(self
, url
, page_set
):
11 super(KeyDesktopSitesPage
, self
).__init
__(
12 url
=url
, page_set
=page_set
, credentials_path
= 'data/credentials.json')
13 self
.archive_data_file
= 'data/key_desktop_sites.json'
15 def RunPageInteractions(self
, action_runner
):
16 with action_runner
.CreateGestureInteraction('ScrollAction'):
17 action_runner
.ScrollPage()
20 class FacebookPage(KeyDesktopSitesPage
):
22 def __init__(self
, page_set
):
23 super(FacebookPage
, self
).__init
__(
24 url
='http://facebook.com',
27 self
.credentials
= 'facebook'
30 class GmailPage(KeyDesktopSitesPage
):
32 def __init__(self
, page_set
):
33 super(GmailPage
, self
).__init
__(
34 url
='https://mail.google.com/mail/',
37 self
.scrollable_element_function
= '''
39 gmonkey.load('2.0', function(api) {
40 callback(api.getScrollableElement());
43 self
.credentials
= 'google'
45 def RunPageInteractions(self
, action_runner
):
46 with action_runner
.CreateGestureInteraction('ScrollAction'):
47 action_runner
.ScrollPage()
48 action_runner
.WaitForJavaScriptCondition(
49 'window.gmonkey !== undefined && '
50 'document.getElementById("gb") !== null')
53 class GoogleCalendarPage(KeyDesktopSitesPage
):
55 def __init__(self
, page_set
):
56 super(GoogleCalendarPage
, self
).__init
__(
57 url
='https://www.google.com/calendar/',
60 self
.scrollable_element_function
= '''
62 callback(document.getElementById('scrolltimedeventswk'));
64 self
.credentials
= 'google'
67 class GoogleDrivePage(KeyDesktopSitesPage
):
69 def __init__(self
, page_set
):
70 super(GoogleDrivePage
, self
).__init
__(
71 url
='https://drive.google.com',
74 self
.scrollable_element_function
= '''
76 callback(document.getElementsByClassName('doclistview-list')[0]);
78 self
.credentials
= 'google'
80 def RunPageInteractions(self
, action_runner
):
81 with action_runner
.CreateGestureInteraction('ScrollAction'):
82 action_runner
.ScrollPage()
83 action_runner
.WaitForJavaScriptCondition(
84 'document.getElementsByClassName("doclistview-list").length')
87 class GoogleDocPage(KeyDesktopSitesPage
):
89 def __init__(self
, page_set
):
90 super(GoogleDocPage
, self
).__init
__(
91 # pylint: disable=C0301
92 url
='https://docs.google.com/a/google.com/document/d/1XMAtPiVFZfItsMUOYl39v5YA8bcSPe4LDrVO25OdsCU/edit',
95 self
.scrollable_element_function
= '''
97 callback(document.getElementsByClassName('kix-appview-editor')[0]);
99 self
.credentials
= 'google'
101 def RunPageInteractions(self
, action_runner
):
102 with action_runner
.CreateGestureInteraction('ScrollAction'):
103 action_runner
.ScrollPage()
104 action_runner
.WaitForJavaScriptCondition(
105 'document.getElementsByClassName("kix-appview-editor").length')
108 class KeyDesktopSitesPageSet(story
.StorySet
):
110 """ Sites of Interest """
113 super(KeyDesktopSitesPageSet
, self
).__init
__(
114 archive_data_file
='data/key_desktop_sites.json',
115 cloud_storage_bucket
=story
.PARTNER_BUCKET
)
117 self
.AddStory(FacebookPage(self
))
118 self
.AddStory(GmailPage(self
))
119 self
.AddStory(GoogleCalendarPage(self
))
120 self
.AddStory(GoogleDrivePage(self
))
121 self
.AddStory(GoogleDocPage(self
))
124 'http://www.google.com/nexus/5/#/',
125 'http://youtube.com',
126 'http://twitter.com/nbc',
129 'http://espn.go.com',
131 'http://bbc.co.uk/news/',
132 'http://weather.com',
133 'http://livejournal.com',
134 'http://deviantart.com',
135 'http://foxnews.com',
136 'http://nbcnews.com',
138 'http://movies.yahoo.com',
139 'http://tv.yahoo.com',
140 'http://pandora.com',
143 'http://abcnews.go.com',
144 'http://youtube.com/videos',
146 'http://money.cnn.com',
147 'http://msn.foxsports.com',
148 'http://cbsnews.com',
151 'http://sportsillustrated.cnn.com',
152 'http://home.disney.go.com',
153 'http://urbandictionary.com',
154 'http://rottentomatoes.com',
155 'http://foodnetwork.com',
160 'http://eonline.com',
161 'http://egotastic.com',
162 'http://copyscape.com',
164 'http://ultimate-guitar.com',
165 'http://comcast.com',
167 'http://fanfiction.net',
168 'http://discovery.com',
170 'http://metrolyrics.com',
171 'http://foxnews.com/entertainment/',
172 'http://cartoonnetwork.com',
174 'http://finance.yahoo.com',
175 'http://alibaba.com',
176 'http://bankofamerica.com',
177 'http://www.chase.com/',
178 'http://wellsfargo.com',
180 'http://online.wsj.com',
182 'http://samsung.com',
183 'http://reuters.com',
186 'http://clickbank.com',
190 'http://constantcontact.com',
191 'http://ezinearticles.com',
192 'http://shutterstock.com',
193 'http://americanexpress.com',
194 'http://freelancer.com',
195 'http://istockphoto.com',
197 'http://verizonwireless.com',
198 'http://capitalone.com',
199 'http://bloomberg.com',
200 'http://monster.com',
201 'http://hdfcbank.com',
202 'http://fotolia.com',
203 'http://thesun.co.uk',
206 'http://tradedoubler.com',
207 'http://icicibank.com',
210 'http://icbc.com.cn',
211 'http://news.cnet.com',
212 'http://verizon.com',
213 'http://careerbuilder.com',
215 'http://getresponse.com',
216 'http://sitesell.com',
218 'http://www.blogger.com/',
220 'http://google.com/analytics/',
224 'http://thepiratebay.se',
227 'http://stackoverflow.com',
228 'http://godaddy.com',
229 'http://mediafire.com',
230 'http://wordpress.org',
231 'http://adwords.google.com',
233 'http://4shared.com',
235 'http://play.google.com/',
238 'http://mozilla.org',
239 'http://www.stumbleupon.com/stumbler/chimacintosh',
240 'http://www.google.com/adsense/',
241 'http://my.yahoo.com',
242 'http://sourceforge.net',
243 'http://answers.com',
244 'http://wordpress.org/extend/plugins/',
245 'http://photobucket.com',
246 'http://clicksor.com',
247 'http://google.com/reader/',
248 'http://store.apple.com',
250 'http://statcounter.com',
252 'http://slideshare.net',
253 'http://salesforce.com',
254 'http://myspace.com',
255 'http://hootsuite.com',
256 'http://domaintools.com',
258 'http://soundcloud.com',
259 'http://download.cnet.com',
260 'http://archive.org',
261 'http://filestube.com',
262 'http://developers.facebook.com',
263 'http://hostgator.com',
268 'http://miniclip.com',
270 'http://gamespot.com',
271 'http://steampowered.com',
272 'http://gamefaqs.com',
274 'http://games.yahoo.com',
275 'http://betfair.com',
276 'http://kongregate.com',
278 'http://leagueoflegends.com',
280 'http://williamhill.com',
281 'http://playstation.com',
282 'http://wowhead.com',
284 'http://minecraft.net',
286 'http://minecraftwiki.net',
287 'http://addictinggames.com',
288 'http://mmo-champion.com',
289 'http://runescape.com',
290 'http://travian.com',
291 'http://zone.msn.com',
293 'http://calottery.com',
294 'http://freeonlinegames.com',
298 'http://callofduty.com',
299 'http://us.playstation.com',
300 'http://bet-at-home.com',
301 'http://gametrailers.com',
302 'http://teamliquid.net',
303 'http://nick.com/games/',
304 'http://planetminecraft.com',
305 'http://nintendo.com',
307 'http://gamehouse.com',
309 'http://bulbagarden.net',
310 'http://rockstargames.com',
311 'http://partycasino.com',
312 'http://square-enix.com',
313 'http://perfectworld.com',
316 'http://ncbi.nlm.nih.gov/pubmed/',
317 'http://focusoncrohnsdisease.com',
318 'http://mayoclinic.com',
319 'http://mercola.com',
321 'http://menshealth.com',
322 'http://nlm.nih.gov/medlineplus/',
323 'http://weightwatchers.com',
325 'http://caloriecount.about.com',
326 'http://patents.uspto.gov',
327 'http://psychologytoday.com',
329 'http://medscape.com',
330 'http://foxnews.com/health/',
332 'http://healthboards.com',
335 'http://kidshealth.org',
337 'http://netdoctor.co.uk',
338 'http://prevention.com',
339 'http://makeupalley.com',
340 'http://stevepavlina.com',
341 'http://realage.com',
342 'http://fitnessmagazine.com',
343 'http://healthcentral.com',
346 'http://totalbeauty.com',
348 'http://telegraph.co.uk/health/',
349 'http://drbatras.com',
352 'http://medcohealth.com',
353 'http://webmd.com/skin-problems-and-treatments/default.htm',
357 'http://healthguru.com',
358 'http://earthclinic.com',
359 'http://curezone.com',
360 'http://beauty.about.com',
361 'http://www.kaiserpermanente.org/',
363 'http://24hourfitness.com',
366 'http://groupon.com/san-francisco',
367 'http://engadget.com',
368 'http://gsmarena.com',
369 'http://reviews.cnet.com',
370 'http://allrecipes.com',
371 'http://autos.yahoo.com',
372 'http://shopping.yahoo.com',
373 'http://gizmodo.com',
374 'http://marketwatch.com',
375 'http://babycenter.com',
378 'http://dpreview.com',
379 'http://tomshardware.com',
380 'http://theverge.com',
381 'http://instructables.com',
382 'http://cafemom.com',
383 'http://google.com/products',
385 'http://shopping.com',
388 'http://retailmenot.com',
389 'http://edmunds.com',
390 'http://mobile9.com',
391 'http://bankrate.com',
392 'http://fatwallet.com',
395 'http://coupons.com',
396 'http://apartmenttherapy.com',
397 'http://phonearena.com',
398 'http://shopzilla.com',
399 'http://marthastewart.com',
400 'http://consumerreports.org',
401 'http://pricegrabber.com',
402 'http://epinions.com',
405 'http://mouthshut.com',
406 'http://travel.state.gov',
407 'http://realsimple.com',
408 'http://opendns.com',
409 'http://gardenweb.com',
410 'http://blu-ray.com',
411 'http://thesaurus.com',
412 'http://espncricinfo.com',
414 'http://bbc.co.uk/sport/0/football/',
416 'http://xe.com/ucc/',
417 'http://timeanddate.com',
418 'http://soccernet.espn.go.com',
419 'http://howstuffworks.com',
420 'http://en.wikipedia.org/wiki/Main_Page',
421 'http://reverso.net',
422 'http://timeanddate.com/worldclock/',
423 'http://sitepoint.com',
425 'http://stardoll.com',
426 'http://london2012.com',
428 'http://000webhost.com',
432 'http://girlsgogames.com',
433 'http://pbskids.org',
434 'http://thestar.com',
435 'http://dynamicdrive.com',
438 'http://earthquake.usgs.gov',
439 'http://khanacademy.org',
441 'http://sciencedaily.com',
442 'http://gocomics.com',
443 'http://webdeveloper.com',
444 'http://www2.warnerbros.com',
445 'http://jpl.nasa.gov',
448 'http://nationalpost.com',
449 'http://booking.com',
450 'http://tripadvisor.com',
453 'http://expedia.com',
454 'http://metacafe.com',
455 'http://priceline.com',
456 'http://southwest.com',
457 'http://cracked.com',
459 'http://travelocity.com',
462 'http://ryanair.com',
463 'http://lonelyplanet.com',
466 'http://easyjet.com',
468 'http://travel.yahoo.com',
469 'http://marriott.com',
470 'http://couchsurfing.org',
471 'http://hotwire.com',
472 'http://autoblog.com',
473 'http://lufthansa.com',
474 'http://theonion.com',
475 'http://britishairways.com',
476 'http://travelzoo.com',
477 'http://ebaumsworld.com',
478 'http://emirates.com',
480 'http://wikitravel.org',
482 'http://collegehumor.com',
485 'http://opentable.com',
488 'http://airberlin.com',
489 'http://usairways.com',
490 'http://skyscanner.net',
491 'http://timeout.com',
492 'http://homeaway.com',
493 'http://lonelyplanet.com/thorntree/',
494 'http://virgin-atlantic.com',
495 'http://news.yahoo.com',
496 'http://huffingtonpost.com',
497 'http://news.google.com',
499 'http://guardian.co.uk',
500 'http://timesofindia.indiatimes.com',
501 'http://washingtonpost.com',
502 'http://usatoday.com',
503 'http://drudgereport.com',
504 'http://latimes.com',
505 'http://wunderground.com',
506 'http://accuweather.com',
507 'http://examiner.com',
508 'http://news.com.au',
510 'http://alarabiya.net',
511 'http://businessweek.com',
513 'http://weather.yahoo.com',
514 'http://foxnews.com/politics/',
515 'http://economictimes.indiatimes.com',
516 'http://nationalgeographic.com',
521 'http://hindustantimes.com',
522 'http://chicagotribune.com',
523 'http://newsmax.com',
524 'http://breitbart.com',
525 'http://economist.com',
526 'http://theatlantic.com',
528 'http://theglobeandmail.com',
529 'http://answers.yahoo.com',
530 'http://wiki.answers.com',
531 'http://wordreference.com',
532 'http://thefreedictionary.com',
533 'http://dict.leo.org',
535 'http://nlm.nih.gov',
536 'http://goodreads.com',
537 'http://mapquest.com',
538 'http://yellowpages.com',
539 'http://wiktionary.org',
541 'http://bing.com/maps/',
542 'http://whitepages.com',
544 'http://classmates.com',
545 'http://blackboard.com',
546 'http://justanswer.com',
548 'http://medterms.com',
549 'http://stanford.edu',
550 'http://brainyquote.com',
551 'http://harvard.edu',
552 'http://superpages.com',
554 'http://en.wiktionary.org',
555 'http://investopedia.com',
556 'http://lumosity.com',
557 'http://phoenix.edu',
558 'http://berkeley.edu',
559 'http://ecollege.com',
561 'http://yellowpages.sulekha.com',
562 'http://wisegeek.com',
564 'http://wwp.greenwichmeantime.com',
565 'http://cornell.edu',
567 'http://maps.yahoo.com',
568 'http://linkedin.com/answers',
569 'http://yahoo.co.jp',
570 'http://translate.google.com',
572 'http://ncbi.nlm.nih.gov',
573 'http://nhc.noaa.gov',
578 'http://sciencedirect.com',
579 'http://intellicast.com',
580 'http://guardian.co.uk/technology',
582 'http://wunderground.com/tropical/',
584 'http://elsevier.com',
586 'http://redorbit.com',
587 'http://scientificamerican.com',
589 'http://metoffice.gov.uk',
591 'http://foreignpolicy.com',
592 'http://bbc.co.uk/news/technology/',
593 'http://newscientist.com',
594 'http://livescience.com',
597 'http://foxnews.com/scitech/',
601 'http://metric-conversions.org',
602 'http://news.nationalgeographic.com/index.rss',
603 'http://bbc.co.uk/news/science_and_environment/',
604 'http://colorado.edu',
608 'http://netflix.com',
609 'http://amazon.co.uk',
610 'http://walmart.com',
612 'http://bestbuy.com',
613 'http://multiply.com',
615 'http://homedepot.com',
617 'http://livingsocial.com',
619 'http://bodybuilding.com',
621 'http://barnesandnoble.com',
624 'http://overstock.com',
626 'http://staples.com',
627 'http://shutterfly.com',
629 'http://nordstrom.com',
630 'http://pixmania.com',
632 'http://bhphotovideo.com',
634 'http://ticketmaster.com',
635 'http://jcpenney.com',
636 'http://walgreens.com',
638 'http://autotrader.com',
639 'http://tigerdirect.com',
640 'http://trademe.co.nz',
642 'http://directv.com',
644 'http://victoriassecret.com',
646 'http://gamestop.com',
648 'http://dealextreme.com',
649 'http://cafepress.com',
651 'http://facebook.com/home.php#!/OccupyAirForce',
652 'http://deviantart.com/#catpath=anthro',
653 'http://shine.yahoo.com',
655 'http://siteadvisor.com',
658 'http://ancestry.com',
659 'http://sulekha.com',
661 'http://biblegateway.com',
663 'http://correios.com.br',
664 'http://wonderwall.msn.com',
669 'http://infowars.com',
671 'http://ec.europa.eu',
672 'http://justjared.com',
673 'http://sheknows.com',
674 'http://slashdot.org',
675 'http://newgrounds.com',
676 'http://weeklystandard.com',
677 'http://royalmail.com',
680 'http://dailykos.com',
681 'http://complex.com',
684 'http://theregister.co.uk',
685 'http://creativecommons.org',
687 'http://peoplesmart.com',
690 'http://whitehouse.gov',
691 'http://townhall.com',
693 'http://sports.yahoo.com',
695 'http://mlb.mlb.com',
696 'http://cbssports.com',
697 'http://bleacherreport.com',
698 'http://livescore.com',
699 'http://espn.go.com/nfl/',
700 'http://sports.yahoo.com/nfl',
701 'http://espn.go.com/mlb/',
702 'http://premierleague.com',
703 'http://skysports.com',
704 'http://sports.yahoo.com/mlb',
705 'http://games.espn.go.com/frontpage',
706 'http://uk.eurosport.yahoo.com',
707 'http://baseball.fantasysports.yahoo.com',
708 'http://baseball.fantasysports.yahoo.com/b1',
709 'http://skysports.com/football/',
711 'http://hattrick.org',
713 'http://telegraph.co.uk/sport/',
715 'http://sports.yahoo.com/fantasy',
716 'http://espn.go.com/nba/',
718 'http://msn.foxsports.com/nfl',
719 'http://sports.yahoo.com/nfl/players/',
720 'http://guardian.co.uk/football',
721 'http://rotoworld.com',
723 'http://arsenal.com',
724 'http://formula1.com',
725 'http://yardbarker.com',
726 'http://pgatour.com',
728 'http://liverpoolfc.tv',
729 'http://deadspin.com',
730 'http://sbnation.com',
731 'https://www.google.com',
732 'https://www.google.com/search?q=barack%20obama',
733 'https://maps.google.com',
734 'http://reader.google.com',
735 'https://plus.google.com/110031535020051778989/posts/2wP4KPPBMG8',
736 'https://plus.google.com/110031535020051778989/photos',
737 'http://googleblog.blogspot.com/',
738 'https://chrome.google.com/webstore/category/home',
739 'http://staff.tumblr.com/',
740 'http://mashable.com/',
741 'http://www.buzzfeed.com/celebrity',
742 'http://www.thedailybeast.com/',
743 'http://www.theverge.com/',
744 'http://techcrunch.com/',
745 'http://www.engadget.com/',
746 'http://gizmodo.com/',
747 'http://thinkprogress.org/?mobile=nc',
748 'http://gawker.com/',
749 'http://arstechnica.com/',
750 'http://boingboing.net/category/featured/',
751 'http://thenextweb.com/',
752 'http://politicalticker.blogs.cnn.com/',
753 'http://deadspin.com/',
754 'http://news.yahoo.com/',
755 'http://www.cnn.com/',
756 'http://www.nbcnews.com/',
757 'http://www.bbc.co.uk/news/',
758 'http://www.reddit.com/',
759 'http://my.yahoo.com/',
760 'http://www.foxnews.com/',
761 'http://www.guardiannews.com/uk-home',
762 'http://timesofindia.indiatimes.com/',
763 'http://online.wsj.com/home-page',
764 'http://www.forbes.com/home_usa/',
765 'http://www.washingtonpost.com/',
766 'http://www.usatoday.com/',
767 'http://drudgereport.com/',
768 'http://abcnews.go.com/',
769 'http://www.latimes.com/',
770 'http://www.bloomberg.com/',
771 'http://money.cnn.com/',
772 'http://www.news.com.au/',
773 'http://www.cbsnews.com/',
774 'http://www.examiner.com/',
775 'http://www.cnbc.com/',
776 'http://www.alarabiya.net/default.html',
777 'http://www.time.com/time/',
778 'http://www.foxnews.com/politics/index.html',
779 'http://www.smh.com.au/',
780 'http://www.businessweek.com/',
781 'http://www.nationalgeographic.com/',
782 # pylint: disable=C0301
783 'http://www.wunderground.com/cgi-bin/findweather/getForecast?query=94035&sp=KCAMOUNT24',
784 # pylint: disable=C0301
785 'http://www.accuweather.com/en/search-locations?zipcode=mountain%20view,%20ca',
786 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043',
787 # pylint: disable=C0301
788 'http://weather.yahoo.com/united-states/california/mountain-view-12797130/',
789 'http://www.yr.no/place/Norway/Oslo/Oslo/Oslo/',
790 'http://www.metoffice.gov.uk/',
791 'http://www.intellicast.com/Local/Weather.aspx?location=USCA0746',
792 # pylint: disable=C0301
793 'http://www.shutterstock.com/cat.mhtml?searchterm=google&search_group=&lang=en&search_source=search_form',
794 'http://www.flickr.com/search/?q=monkeys&f=hp',
795 # pylint: disable=C0301
796 'http://www.flickr.com/photos/davidgutierrez/sets/72157604615916402/?page=3',
797 # pylint: disable=C0301
798 'http://www.flickr.com/photos/davidgutierrez/sets/72157604615916402/show/with/4403158307/',
799 'http://www.apple.com/iphone/',
800 'http://www.taobao.com/index_global.php',
801 'http://hootsuite.com/',
802 'http://www.android.com/',
803 'https://www.change.org/',
804 'http://www.nytimes.com/skimmer/#/Technology',
805 'http://www.glennbeck.com/',
806 'http://www.pengyou.com/mobile?from=loginAndroid',
807 'http://en.wikipedia.org/wiki/Cat',
808 'http://en.wikipedia.org/wiki/British_Royal_Family',
809 'http://9gag.com/gag/5202885',
810 'http://www.wowwiki.com/World_of_Warcraft:_Mists_of_Pandaria',
811 'http://twitter.github.com/bootstrap/',
812 # pylint: disable=C0301
813 'http://reviews.cnet.com/8301-13727_7-57431192-263/disable-elastic-scrolling-in-os-x/',
815 'http://thenounproject.com/zh-cn/',
816 'http://allrecipes.com/recipe/chicken-pot-pie-ix/',
817 'http://www.gamespot.com/',
818 'http://valleywag.com/',
819 # pylint: disable=C0301
820 'http://gawker.com/5939683/based-on-a-true-story-is-a-rotten-lie-i-hope-you-never-believe',
821 'http://www.imdb.com/title/tt0910970/',
822 'http://www.html5rocks.com/en/',
823 # pylint: disable=C0301
824 'http://athome.kimvallee.com/2010/03/why-to-splurge-on-a-high-end-dishwasher/',
825 ('http://mlb.mlb.com/mlb/gameday/index.jsp?gid=2012_08_31_sfnmlb_chnmlb_1'
826 '&mode=wrap#gid=2012_08_31_sfnmlb_chnmlb_1&mode=box'),
827 'http://nytimes.com',
828 'http://arstechnica.com',
829 'http://pinterest.com',
830 'http://www.theregister.co.uk/',
831 'http://forum.xda-developers.com/',
832 'http://maps.google.com',
833 'https://www.google.com/search?num=10&hl=en&site=&tbm=isch&q=cats',
834 'http://code.google.com/p/chromium/issues/list',
835 ('http://code.google.com/p/chromium/issues/detail?id=142038'
836 '&q=black%20screen%20amd&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS'
837 '%20Area%20Feature%20Status%20Owner%20Summary'),
838 'http://mlb.mlb.com/index.jsp',
839 'http://www.nfl.com/',
840 'http://airbnb.github.com/infinity/demo-on.html',
841 'http://habrahabr.ru/post/149892/#habracut'
844 for url
in urls_list
:
845 self
.AddStory(KeyDesktopSitesPage(url
, self
))