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

Side by Side Diff: tools/perf/page_sets/top_10.py

Issue 2927823003: Explicitly set names for stories in Top10PageSet (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 from telemetry.page import shared_page_state 5 from telemetry.page import shared_page_state
6 from telemetry import story 6 from telemetry import story
7 7
8 8
9 class SimplePage(page_module.Page): 9 class SimplePage(page_module.Page):
10 def __init__(self, url, page_set, credentials='', name=''): 10 def __init__(self, url, page_set, credentials='', name=''):
11 if name == '':
12 name = url
11 super(SimplePage, self).__init__( 13 super(SimplePage, self).__init__(
12 url, page_set=page_set, name=name, 14 url, page_set=page_set, name=name,
13 credentials_path='data/credentials.json', 15 credentials_path='data/credentials.json',
14 shared_page_state_class=shared_page_state.SharedDesktopPageState) 16 shared_page_state_class=shared_page_state.SharedDesktopPageState)
15 self.credentials = credentials 17 self.credentials = credentials
16 18
17 def RunPageInteractions(self, action_runner): 19 def RunPageInteractions(self, action_runner):
18 pass 20 pass
19 21
20 22
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 super(Facebook, self).RunNavigateSteps(action_runner) 87 super(Facebook, self).RunNavigateSteps(action_runner)
86 action_runner.WaitForElement(text='About') 88 action_runner.WaitForElement(text='About')
87 89
88 90
89 class Top10PageSet(story.StorySet): 91 class Top10PageSet(story.StorySet):
90 """10 Pages chosen from Alexa top sites""" 92 """10 Pages chosen from Alexa top sites"""
91 93
92 def __init__(self): 94 def __init__(self):
93 super(Top10PageSet, self).__init__( 95 super(Top10PageSet, self).__init__(
94 archive_data_file='data/top_10.json', 96 archive_data_file='data/top_10.json',
95 cloud_storage_bucket=story.PARTNER_BUCKET) 97 cloud_storage_bucket=story.PARTNER_BUCKET,
98 verify_names=True)
96 99
97 # top google property; a google tab is often open 100 # top google property; a google tab is often open
98 self.AddStory(Google(self)) 101 self.AddStory(Google(self))
99 102
100 # productivity, top google properties 103 # productivity, top google properties
101 # TODO(dominikg): fix crbug.com/386152 104 # TODO(dominikg): fix crbug.com/386152
102 #self.AddStory(Gmail(self)) 105 #self.AddStory(Gmail(self))
103 106
104 # productivity, top google properties 107 # productivity, top google properties
105 self.AddStory(GoogleCalendar(self)) 108 self.AddStory(GoogleCalendar(self))
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 self.AddStory(GoogleCalendar(self)) 145 self.AddStory(GoogleCalendar(self))
143 self.AddStory(Youtube(self)) 146 self.AddStory(Youtube(self))
144 # crbug.com/662381. 147 # crbug.com/662381.
145 #self.AddStory(Facebook(self)) 148 #self.AddStory(Facebook(self))
146 self.AddStory(SimplePage('http://en.wikipedia.org/wiki/Wikipedia', 149 self.AddStory(SimplePage('http://en.wikipedia.org/wiki/Wikipedia',
147 self, name='Wikipedia')) 150 self, name='Wikipedia'))
148 self.AddStory(SimplePage('http://www.amazon.com', self)) 151 self.AddStory(SimplePage('http://www.amazon.com', self))
149 self.AddStory(SimplePage('http://www.yahoo.com/', self)) 152 self.AddStory(SimplePage('http://www.yahoo.com/', self))
150 self.AddStory(SimplePage('http://www.bing.com/', self)) 153 self.AddStory(SimplePage('http://www.bing.com/', self))
151 self.AddStory(SimplePage('http://www.ask.com/', self)) 154 self.AddStory(SimplePage('http://www.ask.com/', self))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698