Change next_proto member type.
[chromium-blink-merge.git] / tools / perf / page_sets / tough_energy_cases.py
blob8afcbd76f3b9973f834d568799ef3cd80fb56976
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 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module
8 class ToughEnergyCasesPage(page_module.Page):
10 def __init__(self, url, page_set):
11 super(ToughEnergyCasesPage, self).__init__(
12 url=url, page_set=page_set, credentials_path = 'data/credentials.json')
14 class CodePenPage(ToughEnergyCasesPage):
16 def __init__(self, url, page_set):
17 super(CodePenPage, self).__init__(url, page_set)
18 self.credentials = 'codepen'
21 class GooglePage(ToughEnergyCasesPage):
23 def __init__(self, url, page_set):
24 super(GooglePage, self).__init__(
25 url=url,
26 page_set=page_set)
27 self.credentials = 'google'
29 def RunNavigateSteps(self, action_runner):
30 action_runner.NavigateToPage(self)
31 action_runner.WaitForJavaScriptCondition(
32 'window.gmonkey !== undefined &&'
33 'document.getElementById("gb") !== null')
36 class ToughEnergyCasesPageSet(page_set_module.PageSet):
37 """Pages for measuring Chrome power draw."""
39 def __init__(self):
40 super(ToughEnergyCasesPageSet, self).__init__(
41 archive_data_file='data/tough_energy_cases.json',
42 bucket=page_set_module.PARTNER_BUCKET)
44 # Why: productivity, top google properties
45 self.AddPage(GooglePage('https://mail.google.com/mail/', self))
47 # Disabled: pegs CPU too much to get meaningful results.
48 # Why: Image constantly changed in the background, above the fold
49 # self.AddPage(CodePenPage(
50 # 'http://codepen.io/testificate364/debug/eIutG', self))
52 # Disabled: pegs CPU too much to get meaningful results.
53 # Why: Image constantly changed in the background, below the fold
54 # self.AddPage(CodePenPage(
55 # 'http://codepen.io/testificate364/debug/zcDdv', self))
57 # Why: CSS Animation, above the fold
58 self.AddPage(CodePenPage(
59 'http://codepen.io/testificate364/debug/nrbDc', self))
61 # Why: CSS Animation, below the fold
62 self.AddPage(CodePenPage(
63 'http://codepen.io/testificate364/debug/fhKCg', self))
65 # Why: requestAnimationFrame, above the fold
66 self.AddPage(CodePenPage(
67 'http://codepen.io/testificate364/debug/paJhg',self))
69 # Why: requestAnimationFrame, below the fold
70 self.AddPage(CodePenPage(
71 'http://codepen.io/testificate364/debug/yaosK', self))
73 # Why: setTimeout animation, above the fold
74 self.AddPage(CodePenPage(
75 'http://codepen.io/testificate364/debug/DLbxg', self))
77 # Why: setTimeout animation, below the fold
78 self.AddPage(CodePenPage(
79 'http://codepen.io/testificate364/debug/kFvpd', self))
81 # Why: setInterval animation, above the fold
82 self.AddPage(CodePenPage(
83 'http://codepen.io/testificate364/debug/lEhyw', self))
85 # Why: setInterval animation, below the fold
86 self.AddPage(CodePenPage(
87 'http://codepen.io/testificate364/debug/zhgBD', self))
89 # Why: Animated GIF, above the fold
90 self.AddPage(CodePenPage(
91 'http://codepen.io/testificate364/debug/jetyn', self))
93 # Why: Animated GIF, below the fold
94 self.AddPage(CodePenPage(
95 'http://codepen.io/testificate364/debug/Kvdxs', self))
97 # Why: HTML5 video, above the fold
98 self.AddPage(CodePenPage(
99 'http://codepen.io/testificate364/debug/lJAiH', self))
101 # Why: HTML5 video, below the fold
102 self.AddPage(CodePenPage(
103 'http://codepen.io/testificate364/debug/EFceH', self))
105 # Disabled: pegs CPU too much to get meaningful results.
106 # Why: PostMessage between frames, above the fold
107 # self.AddPage(CodePenPage(
108 # 'http://codepen.io/testificate364/debug/pgBHu', self))
110 # Disabled: pegs CPU too much to get meaningful results.
111 # Why: Asynchronous XHR continually running
112 # self.AddPage(CodePenPage(
113 # 'http://codepen.io/testificate364/debug/iwAfJ', self))
115 # Disabled: pegs CPU too much to get meaningful results.
116 # Why: Web Worker continually running
117 # self.AddPage(CodePenPage(
118 # 'http://codepen.io/testificate364/debug/ckItK', self))
120 # Why: flash video
121 self.AddPage(CodePenPage(
122 'http://codepen.io/testificate364/debug/slBue', self))
124 # Why: Blank page in the foreground
125 self.AddPage(CodePenPage(
126 'http://codepen.io/testificate364/debug/HdIgr', self))