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