| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 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 |
| 5 from telemetry.page import page as page_module |
| 6 from telemetry.page import shared_page_state |
| 7 from telemetry import story |
| 8 |
| 9 |
| 10 URL_LIST = [ |
| 11 'https://webkit.org/blog-files/3d-transforms/poster-circle.html', |
| 12 # Does not autoplay on Android devices. |
| 13 'https://www.youtube.com/watch?v=3KANI2dpXLw?autoplay=1', |
| 14 'about:blank' |
| 15 ] |
| 16 |
| 17 |
| 18 class PowerCasesPage(page_module.Page): |
| 19 |
| 20 def __init__(self, url, page_set, name=''): |
| 21 super(PowerCasesPage, self).__init__( |
| 22 url=url, page_set=page_set, name=name, |
| 23 credentials_path = 'data/credentials.json', |
| 24 shared_page_state_class=shared_page_state.SharedDesktopPageState) |
| 25 self.archive_data_file = 'data/power_cases.json' |
| 26 |
| 27 def RunPageInteractions(self, action_runner): |
| 28 action_runner.Wait(30) |
| 29 |
| 30 |
| 31 class PowerCasesPageSet(story.StorySet): |
| 32 """Power hungry pages, used for power testing.""" |
| 33 |
| 34 def __init__(self): |
| 35 super(PowerCasesPageSet, self).__init__( |
| 36 archive_data_file='data/power_cases.json', |
| 37 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 38 |
| 39 for url in URL_LIST: |
| 40 self.AddStory(PowerCasesPage(url, self)) |
| OLD | NEW |