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