| 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 import story | 5 from telemetry import story |
| 6 | 6 |
| 7 class ImageDecodingCasesPage(page_module.Page): | 7 class ImageDecodingCasesPage(page_module.Page): |
| 8 | 8 |
| 9 def __init__(self, url, page_set, name): | 9 def __init__(self, url, page_set, name): |
| 10 super(ImageDecodingCasesPage, self).__init__( | 10 super(ImageDecodingCasesPage, self).__init__( |
| 11 url=url, page_set=page_set, name=name) | 11 url=url, page_set=page_set, name=name) |
| 12 | 12 |
| 13 def RunPageInteractions(self, action_runner): | 13 def RunPageInteractions(self, action_runner): |
| 14 with action_runner.CreateInteraction('DecodeImage'): | 14 with action_runner.CreateInteraction('DecodeImage'): |
| 15 action_runner.Wait(5) | 15 action_runner.Wait(5) |
| 16 | 16 |
| 17 class ImageDecodingCasesPageSet(story.StorySet): | 17 class ImageDecodingCasesPageSet(story.StorySet): |
| 18 | 18 |
| 19 """ A directed benchmark of accelerated jpeg image decoding performance """ | 19 """ A directed benchmark of accelerated jpeg image decoding performance """ |
| 20 | 20 |
| 21 def __init__(self): | 21 def __init__(self): |
| 22 super(ImageDecodingCasesPageSet, self).__init__(verify_names=True) | 22 super(ImageDecodingCasesPageSet, self).__init__() |
| 23 | 23 |
| 24 urls_list = [ | 24 urls_list = [ |
| 25 ('file://image_decoding_cases/yuv_decoding.html', 'yuv_decoding.html') | 25 ('file://image_decoding_cases/yuv_decoding.html', 'yuv_decoding.html') |
| 26 ] | 26 ] |
| 27 | 27 |
| 28 for url, name in urls_list: | 28 for url, name in urls_list: |
| 29 self.AddStory(ImageDecodingCasesPage(url, self, name)) | 29 self.AddStory(ImageDecodingCasesPage(url, self, name)) |
| OLD | NEW |