OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import story |
4 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
5 from telemetry.page import page_set as page_set_module | 6 |
6 | 7 |
7 class ToughAnimatedImageCasesPage(page_module.Page): | 8 class ToughAnimatedImageCasesPage(page_module.Page): |
8 | 9 |
9 def __init__(self, url, page_set): | 10 def __init__(self, url, page_set): |
10 super(ToughAnimatedImageCasesPage, self).__init__( | 11 super(ToughAnimatedImageCasesPage, self).__init__( |
11 url=url, page_set=page_set) | 12 url=url, page_set=page_set) |
12 | 13 |
13 def RunPageInteractions(self, action_runner): | 14 def RunPageInteractions(self, action_runner): |
14 with action_runner.CreateInteraction('ToughAnimatedImage'): | 15 with action_runner.CreateInteraction('ToughAnimatedImage'): |
15 action_runner.Wait(10) | 16 action_runner.Wait(10) |
16 | 17 |
17 class ToughAnimatedImageCasesPageSet(page_set_module.PageSet): | 18 class ToughAnimatedImageCasesPageSet(story.StorySet): |
18 | 19 |
19 """ | 20 """ |
20 Description: A collection of difficult animated image tests | 21 Description: A collection of difficult animated image tests |
21 """ | 22 """ |
22 | 23 |
23 def __init__(self): | 24 def __init__(self): |
24 super(ToughAnimatedImageCasesPageSet, self).__init__() | 25 super(ToughAnimatedImageCasesPageSet, self).__init__() |
25 | 26 |
26 urls_list = [ | 27 urls_list = [ |
27 'file://tough_animated_image_cases/gifs.html' | 28 'file://tough_animated_image_cases/gifs.html' |
28 ] | 29 ] |
29 | 30 |
30 for url in urls_list: | 31 for url in urls_list: |
31 self.AddUserStory(ToughAnimatedImageCasesPage(url, self)) | 32 self.AddUserStory(ToughAnimatedImageCasesPage(url, self)) |
OLD | NEW |