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

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

Issue 625123002: Make credential_path a page attribute instead of page_set attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to path & path_unittest Created 6 years, 2 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
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 page_set as page_set_module 5 from telemetry.page import page_set as page_set_module
6 6
7 7
8 class ToughEnergyCasesPage(page_module.Page): 8 class ToughEnergyCasesPage(page_module.Page):
9 9
10 def __init__(self, url, page_set): 10 def __init__(self, url, page_set):
11 super(ToughEnergyCasesPage, self).__init__(url=url, page_set=page_set) 11 super(ToughEnergyCasesPage, self).__init__(
12 self.credentials_path = 'data/credentials.json' 12 url=url, page_set=page_set, credentials_path = 'data/credentials.json')
13 13
14 class CodePenPage(ToughEnergyCasesPage): 14 class CodePenPage(ToughEnergyCasesPage):
15 15
16 def __init__(self, url, page_set): 16 def __init__(self, url, page_set):
17 super(CodePenPage, self).__init__(url, page_set) 17 super(CodePenPage, self).__init__(url, page_set)
18 self.credentials = 'codepen' 18 self.credentials = 'codepen'
19 19
20 20
21 class GooglePage(ToughEnergyCasesPage): 21 class GooglePage(ToughEnergyCasesPage):
22 22
23 def __init__(self, url, page_set): 23 def __init__(self, url, page_set):
24 super(GooglePage, self).__init__( 24 super(GooglePage, self).__init__(
25 url=url, 25 url=url,
26 page_set=page_set) 26 page_set=page_set)
27 self.credentials = 'google' 27 self.credentials = 'google'
28 28
29 def RunNavigateSteps(self, action_runner): 29 def RunNavigateSteps(self, action_runner):
30 action_runner.NavigateToPage(self) 30 action_runner.NavigateToPage(self)
31 action_runner.WaitForJavaScriptCondition( 31 action_runner.WaitForJavaScriptCondition(
32 'window.gmonkey !== undefined &&' 32 'window.gmonkey !== undefined &&'
33 'document.getElementById("gb") !== null') 33 'document.getElementById("gb") !== null')
34 34
35 35
36 class ToughEnergyCasesPageSet(page_set_module.PageSet): 36 class ToughEnergyCasesPageSet(page_set_module.PageSet):
37 """Pages for measuring Chrome power draw.""" 37 """Pages for measuring Chrome power draw."""
38 38
39 def __init__(self): 39 def __init__(self):
40 super(ToughEnergyCasesPageSet, self).__init__( 40 super(ToughEnergyCasesPageSet, self).__init__(
41 archive_data_file='data/tough_energy_cases.json', 41 archive_data_file='data/tough_energy_cases.json',
42 bucket=page_set_module.PUBLIC_BUCKET, 42 bucket=page_set_module.PUBLIC_BUCKET)
43 credentials_path='data/credentials.json')
44 43
45 # Why: productivity, top google properties 44 # Why: productivity, top google properties
46 self.AddPage(GooglePage('https://mail.google.com/mail/', self)) 45 self.AddPage(GooglePage('https://mail.google.com/mail/', self))
47 46
48 # Disabled: pegs CPU too much to get meaningful results. 47 # Disabled: pegs CPU too much to get meaningful results.
49 # Why: Image constantly changed in the background, above the fold 48 # Why: Image constantly changed in the background, above the fold
50 # self.AddPage(CodePenPage( 49 # self.AddPage(CodePenPage(
51 # 'http://codepen.io/testificate364/debug/eIutG', self)) 50 # 'http://codepen.io/testificate364/debug/eIutG', self))
52 51
53 # Disabled: pegs CPU too much to get meaningful results. 52 # Disabled: pegs CPU too much to get meaningful results.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 # self.AddPage(CodePenPage( 117 # self.AddPage(CodePenPage(
119 # 'http://codepen.io/testificate364/debug/ckItK', self)) 118 # 'http://codepen.io/testificate364/debug/ckItK', self))
120 119
121 # Why: flash video 120 # Why: flash video
122 self.AddPage(CodePenPage( 121 self.AddPage(CodePenPage(
123 'http://codepen.io/testificate364/debug/slBue', self)) 122 'http://codepen.io/testificate364/debug/slBue', self))
124 123
125 # Why: Blank page in the foreground 124 # Why: Blank page in the foreground
126 self.AddPage(CodePenPage( 125 self.AddPage(CodePenPage(
127 'http://codepen.io/testificate364/debug/HdIgr', self)) 126 'http://codepen.io/testificate364/debug/HdIgr', self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/tough_compositor_cases.py ('k') | tools/perf/page_sets/tough_layer_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698