Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: tools/chrome_proxy/live_tests/pagesets/top_20.py

Issue 1218073014: Migrate from telemetry PageSet -> StorySet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments and rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/chrome_proxy/live_tests/pagesets/__init__.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 telemetry.page import page as page_module 5 from telemetry.page import page as page_module
6 from telemetry.page import page_set as page_set_module 6 from telemetry import story
7 7
8 8
9 class Top20Page(page_module.Page): 9 class Top20Page(page_module.Page):
10 10
11 def __init__(self, url, page_set, name=''): 11 def __init__(self, url, page_set, name=''):
12 super(Top20Page, self).__init__(url=url, page_set=page_set, name=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' 13 self.archive_data_file = '../data/chrome_proxy_top_20.json'
14 14
15 class Top20PageSet(page_set_module.PageSet): 15 class Top20StorySet(story.StorySet):
16 16
17 """ Pages hand-picked for Chrome Proxy tests. """ 17 """ Pages hand-picked for Chrome Proxy tests. """
18 18
19 def __init__(self): 19 def __init__(self):
20 super(Top20PageSet, self).__init__( 20 super(Top20StorySet, self).__init__(
21 archive_data_file='../data/chrome_proxy_top_20.json') 21 archive_data_file='../data/chrome_proxy_top_20.json')
22 22
23 # Why: top google property; a google tab is often open 23 # Why: top google property; a google tab is often open
24 self.AddUserStory(Top20Page('https://www.google.com/#hl=en&q=barack+obama', 24 self.AddStory(Top20Page('https://www.google.com/#hl=en&q=barack+obama',
25 self)) 25 self))
26 26
27 # Why: #3 (Alexa global) 27 # Why: #3 (Alexa global)
28 self.AddUserStory(Top20Page('http://www.youtube.com', self)) 28 self.AddStory(Top20Page('http://www.youtube.com', self))
29 29
30 # Why: #18 (Alexa global), Picked an interesting post 30 # Why: #18 (Alexa global), Picked an interesting post
31 self.AddUserStory(Top20Page( 31 self.AddStory(Top20Page(
32 # pylint: disable=C0301 32 # pylint: disable=C0301
33 'http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for -august-2012/', 33 'http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks-for -august-2012/',
34 self, 'Wordpress')) 34 self, 'Wordpress'))
35 35
36 # Why: top social,Public profile 36 # Why: top social,Public profile
37 self.AddUserStory(Top20Page('http://www.facebook.com/barackobama', self, 37 self.AddStory(Top20Page('http://www.facebook.com/barackobama', self,
38 'Facebook')) 38 'Facebook'))
39 39
40 # Why: #12 (Alexa global),Public profile 40 # Why: #12 (Alexa global),Public profile
41 self.AddUserStory(Top20Page('http://www.linkedin.com/in/linustorvalds', 41 self.AddStory(Top20Page('http://www.linkedin.com/in/linustorvalds',
42 self, 'LinkedIn')) 42 self, 'LinkedIn'))
43 43
44 # Why: #6 (Alexa) most visited worldwide,Picked an interesting page 44 # Why: #6 (Alexa) most visited worldwide,Picked an interesting page
45 self.AddUserStory(Top20Page('http://en.wikipedia.org/wiki/Wikipedia', self, 45 self.AddStory(Top20Page('http://en.wikipedia.org/wiki/Wikipedia', self,
46 'Wikipedia (1 tab)')) 46 'Wikipedia (1 tab)'))
47 47
48 # Why: #8 (Alexa global),Picked an interesting page 48 # Why: #8 (Alexa global),Picked an interesting page
49 self.AddUserStory(Top20Page('https://twitter.com/katyperry', self, 49 self.AddStory(Top20Page('https://twitter.com/katyperry', self,
50 'Twitter')) 50 'Twitter'))
51 51
52 # Why: #37 (Alexa global) 52 # Why: #37 (Alexa global)
53 self.AddUserStory(Top20Page('http://pinterest.com', self, 'Pinterest')) 53 self.AddStory(Top20Page('http://pinterest.com', self, 'Pinterest'))
54 54
55 # Why: #1 sports 55 # Why: #1 sports
56 self.AddUserStory(Top20Page('http://espn.go.com', self, 'ESPN')) 56 self.AddStory(Top20Page('http://espn.go.com', self, 'ESPN'))
57 57
58 # Why: #1 news worldwide (Alexa global) 58 # Why: #1 news worldwide (Alexa global)
59 self.AddUserStory(Top20Page('http://news.yahoo.com', self)) 59 self.AddStory(Top20Page('http://news.yahoo.com', self))
60 60
61 # Why: #2 news worldwide 61 # Why: #2 news worldwide
62 self.AddUserStory(Top20Page('http://www.cnn.com', self)) 62 self.AddStory(Top20Page('http://www.cnn.com', self))
63 63
64 # Why: #7 (Alexa news); #27 total time spent,Picked interesting page 64 # Why: #7 (Alexa news); #27 total time spent,Picked interesting page
65 self.AddUserStory(Top20Page( 65 self.AddStory(Top20Page(
66 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043', 66 'http://www.weather.com/weather/right-now/Mountain+View+CA+94043',
67 self, 'Weather.com')) 67 self, 'Weather.com'))
68 68
69 # Why: #1 world commerce website by visits; #3 commerce in the US by time 69 # Why: #1 world commerce website by visits; #3 commerce in the US by time
70 # spent 70 # spent
71 self.AddUserStory(Top20Page('http://www.amazon.com', self)) 71 self.AddStory(Top20Page('http://www.amazon.com', self))
72 72
73 # Why: #1 commerce website by time spent by users in US 73 # Why: #1 commerce website by time spent by users in US
74 self.AddUserStory(Top20Page('http://www.ebay.com', self)) 74 self.AddStory(Top20Page('http://www.ebay.com', self))
75 75
76 # Why: #1 games according to Alexa (with actual games in it) 76 # Why: #1 games according to Alexa (with actual games in it)
77 self.AddUserStory(Top20Page('http://games.yahoo.com', self)) 77 self.AddStory(Top20Page('http://games.yahoo.com', self))
78 78
79 # Why: #1 Alexa recreation 79 # Why: #1 Alexa recreation
80 self.AddUserStory(Top20Page('http://booking.com', self)) 80 self.AddStory(Top20Page('http://booking.com', self))
81 81
82 # Why: #1 Alexa reference 82 # Why: #1 Alexa reference
83 self.AddUserStory(Top20Page('http://answers.yahoo.com', self)) 83 self.AddStory(Top20Page('http://answers.yahoo.com', self))
84 84
85 # Why: #1 Alexa sports 85 # Why: #1 Alexa sports
86 self.AddUserStory(Top20Page('http://sports.yahoo.com/', self)) 86 self.AddStory(Top20Page('http://sports.yahoo.com/', self))
87 87
88 # Why: top tech blog 88 # Why: top tech blog
89 self.AddUserStory(Top20Page('http://techcrunch.com', self)) 89 self.AddStory(Top20Page('http://techcrunch.com', self))
90 90
91 self.AddUserStory(Top20Page('http://www.nytimes.com', self)) 91 self.AddStory(Top20Page('http://www.nytimes.com', self))
OLDNEW
« no previous file with comments | « tools/chrome_proxy/live_tests/pagesets/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698