| OLD | NEW |
| (Empty) |
| 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 # pylint: disable=W0401,W0614 | |
| 5 | |
| 6 from telemetry.page.actions.all_page_actions import * | |
| 7 from telemetry.page import page as page_module | |
| 8 from telemetry.page import page_set as page_set_module | |
| 9 | |
| 10 | |
| 11 class SkiaBuildbotDesktopPage(page_module.PageWithDefaultRunNavigate): | |
| 12 | |
| 13 def __init__(self, url, page_set): | |
| 14 super(SkiaBuildbotDesktopPage, self).__init__(url=url, page_set=page_set) | |
| 15 self.user_agent_type = 'desktop' | |
| 16 self.archive_data_file = 'data/skia_yahoosports_desktop.json' | |
| 17 self.credentials_path = 'data/credentials.json' | |
| 18 | |
| 19 def RunSmoothness(self, action_runner): | |
| 20 action_runner.RunAction(ScrollAction()) | |
| 21 | |
| 22 def RunNavigateSteps(self, action_runner): | |
| 23 action_runner.RunAction(NavigateAction()) | |
| 24 action_runner.RunAction(WaitAction( | |
| 25 { | |
| 26 'seconds': 5 | |
| 27 })) | |
| 28 | |
| 29 | |
| 30 class SkiaBuildbotPageSet(page_set_module.PageSet): | |
| 31 | |
| 32 """ Pages designed to represent the median, not highly optimized web """ | |
| 33 | |
| 34 def __init__(self): | |
| 35 super(SkiaBuildbotPageSet, self).__init__( | |
| 36 user_agent_type='desktop', | |
| 37 credentials_path = 'data/credentials.json', | |
| 38 archive_data_file='data/skia_yahoosports_desktop.json') | |
| 39 | |
| 40 urls_list = [ | |
| 41 # Why: #1 Alexa sports | |
| 42 'http://sports.yahoo.com/', | |
| 43 ] | |
| 44 | |
| 45 for url in urls_list: | |
| 46 self.AddPage(SkiaBuildbotDesktopPage(url, self)) | |
| OLD | NEW |