Convert AddUserStory to AddStory for perf/
[chromium-blink-merge.git] / tools / perf / page_sets / tough_energy_cases.py
blob215435c09c3db21e42a3ad6648b9a16ede8fbeba
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 import story
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 = 'google2'
29 def RunNavigateSteps(self, action_runner):
30 super(GooglePage, self).RunNavigateSteps(action_runner)
31 action_runner.WaitForJavaScriptCondition(
32 'window.gmonkey !== undefined &&'
33 'document.getElementById("gb") !== null')
36 class ToughEnergyCasesPageSet(story.StorySet):
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 cloud_storage_bucket=story.PARTNER_BUCKET)
44 # TODO: this part of the test is disabled because it fails when
45 # run with replay data and not with live data. See crbug.com/465692
46 # for complete details.
47 # Why: productivity, top google properties
48 #self.AddStory(GooglePage('https://mail.google.com/mail/', self))
50 # Disabled: pegs CPU too much to get meaningful results.
51 # Why: Image constantly changed in the background, above the fold
52 # self.AddStory(CodePenPage(
53 # 'http://codepen.io/testificate364/debug/eIutG', self))
55 # Disabled: pegs CPU too much to get meaningful results.
56 # Why: Image constantly changed in the background, below the fold
57 # self.AddStory(CodePenPage(
58 # 'http://codepen.io/testificate364/debug/zcDdv', self))
60 # Why: CSS Animation, above the fold
61 self.AddStory(CodePenPage(
62 'http://codepen.io/testificate364/debug/nrbDc', self))
64 # Why: CSS Animation, below the fold
65 self.AddStory(CodePenPage(
66 'http://codepen.io/testificate364/debug/fhKCg', self))
68 # Why: requestAnimationFrame, above the fold
69 self.AddStory(CodePenPage(
70 'http://codepen.io/testificate364/debug/paJhg',self))
72 # Why: requestAnimationFrame, below the fold
73 self.AddStory(CodePenPage(
74 'http://codepen.io/testificate364/debug/yaosK', self))
76 # Why: setTimeout animation, above the fold
77 self.AddStory(CodePenPage(
78 'http://codepen.io/testificate364/debug/DLbxg', self))
80 # Why: setTimeout animation, below the fold
81 self.AddStory(CodePenPage(
82 'http://codepen.io/testificate364/debug/kFvpd', self))
84 # Why: setInterval animation, above the fold
85 self.AddStory(CodePenPage(
86 'http://codepen.io/testificate364/debug/lEhyw', self))
88 # Why: setInterval animation, below the fold
89 self.AddStory(CodePenPage(
90 'http://codepen.io/testificate364/debug/zhgBD', self))
92 # Why: Animated GIF, above the fold
93 self.AddStory(CodePenPage(
94 'http://codepen.io/testificate364/debug/jetyn', self))
96 # Why: Animated GIF, below the fold
97 self.AddStory(CodePenPage(
98 'http://codepen.io/testificate364/debug/Kvdxs', self))
100 # Why: HTML5 video, above the fold
101 self.AddStory(CodePenPage(
102 'http://codepen.io/testificate364/debug/lJAiH', self))
104 # Why: HTML5 video, below the fold
105 self.AddStory(CodePenPage(
106 'http://codepen.io/testificate364/debug/EFceH', self))
108 # Disabled: pegs CPU too much to get meaningful results.
109 # Why: PostMessage between frames, above the fold
110 # self.AddStory(CodePenPage(
111 # 'http://codepen.io/testificate364/debug/pgBHu', self))
113 # Disabled: pegs CPU too much to get meaningful results.
114 # Why: Asynchronous XHR continually running
115 # self.AddStory(CodePenPage(
116 # 'http://codepen.io/testificate364/debug/iwAfJ', self))
118 # Disabled: pegs CPU too much to get meaningful results.
119 # Why: Web Worker continually running
120 # self.AddStory(CodePenPage(
121 # 'http://codepen.io/testificate364/debug/ckItK', self))
123 # Why: flash video
124 self.AddStory(CodePenPage(
125 'http://codepen.io/testificate364/debug/slBue', self))
127 # Why: Blank page in the foreground
128 self.AddStory(CodePenPage(
129 'http://codepen.io/testificate364/debug/HdIgr', self))