# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# pylint: disable=W0401,W0614
-from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class ToughCompositorPage(page_module.Page):
def __init__(self, url, page_set):
- super(ToughCompositorPage, self).__init__(url=url, page_set=page_set)
- self.credentials_path = 'data/credentials.json'
+ super(ToughCompositorPage, self).__init__(
+ url=url, page_set=page_set, credentials_path = 'data/credentials.json')
self.user_agent_type = 'mobile'
self.archive_data_file = 'data/tough_compositor_cases.json'
def RunSmoothness(self, action_runner):
# Make the scroll longer to reduce noise.
- scroll_down = ScrollAction()
- scroll_down.direction = "down"
- scroll_down.speed = 300
- action_runner.RunAction(scroll_down)
+ interaction = action_runner.BeginGestureInteraction(
+ 'ScrollAction', is_smooth=True)
+ action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300)
+ interaction.End()
class ToughCompositorWaitPage(ToughCompositorPage):
def __init__(self):
super(ToughCompositorCasesPageSet, self).__init__(
- credentials_path='data/credentials.json',
user_agent_type='mobile',
archive_data_file='data/tough_compositor_cases.json',
bucket=page_set_module.PUBLIC_BUCKET)