| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 from telemetry.internal.actions import page_action | 4 from telemetry.internal.actions import page_action |
| 5 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
| 6 from telemetry import story | 6 from telemetry import story |
| 7 | 7 |
| 8 | 8 |
| 9 class ToughFastScrollingCasesPage(page_module.Page): | 9 class ToughFastScrollingCasesPage(page_module.Page): |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 speed_in_pixels_per_second=self.speed_in_pixels_per_second, | 24 speed_in_pixels_per_second=self.speed_in_pixels_per_second, |
| 25 synthetic_gesture_source=self.synthetic_gesture_source) | 25 synthetic_gesture_source=self.synthetic_gesture_source) |
| 26 | 26 |
| 27 class ToughScrollingCasesPageSet(story.StorySet): | 27 class ToughScrollingCasesPageSet(story.StorySet): |
| 28 | 28 |
| 29 """ | 29 """ |
| 30 Description: A collection of difficult scrolling tests | 30 Description: A collection of difficult scrolling tests |
| 31 """ | 31 """ |
| 32 | 32 |
| 33 def __init__(self): | 33 def __init__(self): |
| 34 super(ToughScrollingCasesPageSet, self).__init__(verify_names=True) | 34 super(ToughScrollingCasesPageSet, self).__init__() |
| 35 | 35 |
| 36 fast_scrolling_page_name_list = [ | 36 fast_scrolling_page_name_list = [ |
| 37 'text', | 37 'text', |
| 38 'text_hover', | 38 'text_hover', |
| 39 'text_constant_full_page_raster', | 39 'text_constant_full_page_raster', |
| 40 'canvas' | 40 'canvas' |
| 41 ] | 41 ] |
| 42 | 42 |
| 43 fast_scrolling_speed_list = [ | 43 fast_scrolling_speed_list = [ |
| 44 5000, 10000, 15000, 20000, 30000, 40000, 50000, 60000, 75000, 90000 | 44 5000, 10000, 15000, 20000, 30000, 40000, 50000, 60000, 75000, 90000 |
| 45 ] | 45 ] |
| 46 | 46 |
| 47 for name in fast_scrolling_page_name_list: | 47 for name in fast_scrolling_page_name_list: |
| 48 for speed in fast_scrolling_speed_list: | 48 for speed in fast_scrolling_speed_list: |
| 49 synthetic_gesture_source = page_action.GESTURE_SOURCE_DEFAULT | 49 synthetic_gesture_source = page_action.GESTURE_SOURCE_DEFAULT |
| 50 if "hover" in name: | 50 if "hover" in name: |
| 51 synthetic_gesture_source = page_action.GESTURE_SOURCE_MOUSE | 51 synthetic_gesture_source = page_action.GESTURE_SOURCE_MOUSE |
| 52 self.AddStory(ToughFastScrollingCasesPage( | 52 self.AddStory(ToughFastScrollingCasesPage( |
| 53 'file://tough_scrolling_cases/' + name + '.html', | 53 'file://tough_scrolling_cases/' + name + '.html', |
| 54 name + '_' + str(speed).zfill(5) + '_pixels_per_second', | 54 name + '_' + str(speed).zfill(5) + '_pixels_per_second', |
| 55 speed, | 55 speed, |
| 56 self, | 56 self, |
| 57 synthetic_gesture_source)) | 57 synthetic_gesture_source)) |
| OLD | NEW |