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 5 from telemetry.page import page as page_module 6 from telemetry.page import page_set as page_set_module 7 8 9 class Top20Page(page_module.Page): 10 11 def __init__(self, url, page_set, name=''): 12 super(Top20Page, self).__init__(url=url, page_set=page_set, name=name) 13 self.archive_data_file = '../data/chrome_proxy_top_20.json' 14 15 class Top20PageSet(page_set_module.PageSet): 16 17 """ Pages hand-picked for Chrome Proxy tests. """ 18 19 def __init__(self): 20 super(Top20PageSet, self).__init__( 21 archive_data_file='../data/chrome_proxy_top_20.json') 22 23 # Why: top google property; a google tab is often open 24 self.AddPage(Top20Page('https://www.google.com/#hl=en&q=barack+obama', 25 self)) 26 27 # Why: #3 (Alexa global) 28 self.AddPage(Top20Page('http://www.youtube.com', self)) 29 30 # Why: #18 (Alexa global), Picked an interesting post 31 self.AddPage(Top20Page( 32 # pylint: disable=C0301 33 'http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for-august-2012/', 34 self, 'Wordpress')) 35 36 # Why: top social,Public profile 37 self.AddPage(Top20Page('http://www.facebook.com/barackobama', self, 38 'Facebook')) 39 40 # Why: #12 (Alexa global),Public profile 41 self.AddPage(Top20Page('http://www.linkedin.com/in/linustorvalds', self, 42 'LinkedIn')) 43 44 # Why: #6 (Alexa) most visited worldwide,Picked an interesting page 45 self.AddPage(Top20Page('http://en.wikipedia.org/wiki/Wikipedia', self, 46 'Wikipedia (1 tab)')) 47 48 # Why: #8 (Alexa global),Picked an interesting page 49 self.AddPage(Top20Page('https://twitter.com/katyperry', self, 'Twitter')) 50 51 # Why: #37 (Alexa global) 52 self.AddPage(Top20Page('http://pinterest.com', self, 'Pinterest')) 53 54 # Why: #1 sports 55 self.AddPage(Top20Page('http://espn.go.com', self, 'ESPN')) 56 57 # Why: #1 news worldwide (Alexa global) 58 self.AddPage(Top20Page('http://news.yahoo.com', self)) 59 60 # Why: #2 news worldwide 61 self.AddPage(Top20Page('http://www.cnn.com', self)) 62 63 # Why: #7 (Alexa news); #27 total time spent,Picked interesting page 64 self.AddPage(Top20Page( 65 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043', 66 self, 'Weather.com')) 67 68 # Why: #1 world commerce website by visits; #3 commerce in the US by time 69 # spent 70 self.AddPage(Top20Page('http://www.amazon.com', self)) 71 72 # Why: #1 commerce website by time spent by users in US 73 self.AddPage(Top20Page('http://www.ebay.com', self)) 74 75 # Why: #1 games according to Alexa (with actual games in it) 76 self.AddPage(Top20Page('http://games.yahoo.com', self)) 77 78 # Why: #1 Alexa recreation 79 self.AddPage(Top20Page('http://booking.com', self)) 80 81 # Why: #1 Alexa reference 82 self.AddPage(Top20Page('http://answers.yahoo.com', self)) 83 84 # Why: #1 Alexa sports 85 self.AddPage(Top20Page('http://sports.yahoo.com/', self)) 86 87 # Why: top tech blog 88 self.AddPage(Top20Page('http://techcrunch.com', self)) 89 90 self.AddPage(Top20Page('http://www.nytimes.com', self)) 91