| OLD | NEW |
| 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 import story | 5 from telemetry import story |
| 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): |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 = 'google2' | 27 self.credentials = 'google2' |
| 28 | 28 |
| 29 def RunNavigateSteps(self, action_runner): | 29 def RunNavigateSteps(self, action_runner): |
| 30 super(GooglePage, self).RunNavigateSteps(action_runner) | 30 super(GooglePage, self).RunNavigateSteps(action_runner) |
| 31 action_runner.WaitForJavaScriptCondition2( | 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(story.StorySet): | 36 class ToughEnergyCasesPageSet(story.StorySet): |
| 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', |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 # self.AddStory(CodePenPage( | 120 # self.AddStory(CodePenPage( |
| 121 # 'http://codepen.io/testificate364/debug/ckItK', self)) | 121 # 'http://codepen.io/testificate364/debug/ckItK', self)) |
| 122 | 122 |
| 123 # Why: flash video | 123 # Why: flash video |
| 124 self.AddStory(CodePenPage( | 124 self.AddStory(CodePenPage( |
| 125 'http://codepen.io/testificate364/debug/slBue', self)) | 125 'http://codepen.io/testificate364/debug/slBue', self)) |
| 126 | 126 |
| 127 # Why: Blank page in the foreground | 127 # Why: Blank page in the foreground |
| 128 self.AddStory(CodePenPage( | 128 self.AddStory(CodePenPage( |
| 129 'http://codepen.io/testificate364/debug/HdIgr', self)) | 129 'http://codepen.io/testificate364/debug/HdIgr', self)) |
| OLD | NEW |