Revert of Enabling audio quality test on mac. (patchset #1 id:1 of https://codereview...
[chromium-blink-merge.git] / tools / perf / page_sets / tough_energy_cases.py
blob9606157097d5aae07656004ac089ccb03b5972f8
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__(url=url, page_set=page_set)
12 self.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.PUBLIC_BUCKET,
43 credentials_path='data/credentials.json')
45 # Why: productivity, top google properties
46 self.AddPage(GooglePage('https://mail.google.com/mail/', self))
48 # Disabled: pegs CPU too much to get meaningful results.
49 # Why: Image constantly changed in the background, above the fold
50 # self.AddPage(CodePenPage(
51 # 'http://codepen.io/testificate364/debug/eIutG', self))
53 # Disabled: pegs CPU too much to get meaningful results.
54 # Why: Image constantly changed in the background, below the fold
55 # self.AddPage(CodePenPage(
56 # 'http://codepen.io/testificate364/debug/zcDdv', self))
58 # Why: CSS Animation, above the fold
59 self.AddPage(CodePenPage(
60 'http://codepen.io/testificate364/debug/nrbDc', self))
62 # Why: CSS Animation, below the fold
63 self.AddPage(CodePenPage(
64 'http://codepen.io/testificate364/debug/fhKCg', self))
66 # Why: requestAnimationFrame, above the fold
67 self.AddPage(CodePenPage(
68 'http://codepen.io/testificate364/debug/paJhg',self))
70 # Why: requestAnimationFrame, below the fold
71 self.AddPage(CodePenPage(
72 'http://codepen.io/testificate364/debug/yaosK', self))
74 # Why: setTimeout animation, above the fold
75 self.AddPage(CodePenPage(
76 'http://codepen.io/testificate364/debug/DLbxg', self))
78 # Why: setTimeout animation, below the fold
79 self.AddPage(CodePenPage(
80 'http://codepen.io/testificate364/debug/kFvpd', self))
82 # Why: setInterval animation, above the fold
83 self.AddPage(CodePenPage(
84 'http://codepen.io/testificate364/debug/lEhyw', self))
86 # Why: setInterval animation, below the fold
87 self.AddPage(CodePenPage(
88 'http://codepen.io/testificate364/debug/zhgBD', self))
90 # Why: Animated GIF, above the fold
91 self.AddPage(CodePenPage(
92 'http://codepen.io/testificate364/debug/jetyn', self))
94 # Why: Animated GIF, below the fold
95 self.AddPage(CodePenPage(
96 'http://codepen.io/testificate364/debug/Kvdxs', self))
98 # Why: HTML5 video, above the fold
99 self.AddPage(CodePenPage(
100 'http://codepen.io/testificate364/debug/lJAiH', self))
102 # Why: HTML5 video, below the fold
103 self.AddPage(CodePenPage(
104 'http://codepen.io/testificate364/debug/EFceH', self))
106 # Disabled: pegs CPU too much to get meaningful results.
107 # Why: PostMessage between frames, above the fold
108 # self.AddPage(CodePenPage(
109 # 'http://codepen.io/testificate364/debug/pgBHu', self))
111 # Disabled: pegs CPU too much to get meaningful results.
112 # Why: Asynchronous XHR continually running
113 # self.AddPage(CodePenPage(
114 # 'http://codepen.io/testificate364/debug/iwAfJ', self))
116 # Disabled: pegs CPU too much to get meaningful results.
117 # Why: Web Worker continually running
118 # self.AddPage(CodePenPage(
119 # 'http://codepen.io/testificate364/debug/ckItK', self))
121 # Why: flash video
122 self.AddPage(CodePenPage(
123 'http://codepen.io/testificate364/debug/slBue', self))
125 # Why: Blank page in the foreground
126 self.AddPage(CodePenPage(
127 'http://codepen.io/testificate364/debug/HdIgr', self))