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. 4from telemetry.page import page as page_module 5from telemetry.page import page_set as page_set_module 6 7 8class ToughTextureUploadCasesPage(page_module.Page): 9 10 def __init__(self, url, page_set): 11 super( 12 ToughTextureUploadCasesPage, 13 self).__init__( 14 url=url, 15 page_set=page_set) 16 17 def RunSmoothness(self, action_runner): 18 interaction = action_runner.BeginGestureInteraction( 19 'ScrollAction', is_smooth=True) 20 action_runner.ScrollPage() 21 interaction.End() 22 23 24class ToughTextureUploadCasesPageSet(page_set_module.PageSet): 25 26 """ 27 Description: A collection of texture upload performance tests 28 """ 29 30 def __init__(self): 31 super(ToughTextureUploadCasesPageSet, self).__init__() 32 33 urls_list = [ 34 'file://tough_texture_upload_cases/background_color_animation.html', 35 # pylint: disable=C0301 36 'file://tough_texture_upload_cases/background_color_animation_and_transform_animation.html', 37 # pylint: disable=C0301 38 'file://tough_texture_upload_cases/background_color_animation_with_gradient.html', 39 # pylint: disable=C0301 40 'file://tough_texture_upload_cases/background_color_animation_with_gradient_and_transform_animation.html'] 41 for url in urls_list: 42 self.AddPage(ToughTextureUploadCasesPage(url, self)) 43 44