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 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module |
| 6 |
| 7 |
| 8 class ToughFastScrollingCasesPage(page_module.Page): |
| 9 |
| 10 def __init__(self, url, page_set): |
| 11 super(ToughFastScrollingCasesPage, self).__init__( |
| 12 url=url, |
| 13 page_set=page_set) |
| 14 |
| 15 def RunSmoothness(self, action_runner): |
| 16 interaction = action_runner.BeginGestureInteraction( |
| 17 'ScrollAction', is_smooth=True) |
| 18 action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=16000) |
| 19 interaction.End() |
| 20 |
| 21 |
| 22 class ToughFastScrollingCasesPageSet(page_set_module.PageSet): |
| 23 |
| 24 """ |
| 25 Description: A collection of difficult fast scrolling tests |
| 26 """ |
| 27 |
| 28 def __init__(self): |
| 29 super(ToughFastScrollingCasesPageSet, self).__init__() |
| 30 |
| 31 urls_list = [ |
| 32 'file://tough_fast_scrolling_cases/lorem_ipsum.html', |
| 33 'file://tough_fast_scrolling_cases/canvas.html', |
| 34 ] |
| 35 |
| 36 for url in urls_list: |
| 37 self.AddPage(ToughFastScrollingCasesPage(url, self)) |
OLD | NEW |