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.story import story_set as story_set_module | 4 from telemetry.story import story_set as story_set_module |
5 | 5 |
6 from gpu_tests import gpu_test_base | 6 from gpu_tests import gpu_test_base |
7 | 7 |
8 class GpuRasterizationBlueBoxPage(gpu_test_base.PageBase): | 8 class GpuRasterizationBlueBoxPage(gpu_test_base.PageBase): |
9 | 9 |
10 def __init__(self, story_set, expectations): | 10 def __init__(self, story_set, expectations): |
11 super(GpuRasterizationBlueBoxPage, self).__init__( | 11 super(GpuRasterizationBlueBoxPage, self).__init__( |
12 url='file://../../data/gpu/pixel_background.html', | 12 url='file://../../data/gpu/pixel_background.html', |
13 page_set=story_set, | 13 page_set=story_set, |
14 name='GpuRasterization.BlueBox', | 14 name='GpuRasterization.BlueBox', |
15 expectations=expectations) | 15 expectations=expectations) |
16 | 16 |
17 self.expectations = [ | 17 self.expectations = [ |
18 {'comment': 'body-t', | 18 {'comment': 'body-t', |
19 'color': [255, 255, 255], | 19 'color': [0, 128, 0], |
20 'tolerance': 0, | 20 'tolerance': 0, |
21 'location': [5, 5], | 21 'location': [5, 5], |
22 'size': [1, 1]}, | 22 'size': [1, 1]}, |
23 {'comment': 'body-r', | 23 {'comment': 'body-r', |
24 'color': [255, 255, 255], | 24 'color': [0, 128, 0], |
25 'tolerance': 0, | 25 'tolerance': 0, |
26 'location': [215, 5], | 26 'location': [215, 5], |
27 'size': [1, 1]}, | 27 'size': [1, 1]}, |
28 {'comment': 'body-b', | 28 {'comment': 'body-b', |
29 'color': [255, 255, 255], | 29 'color': [0, 128, 0], |
30 'tolerance': 0, | 30 'tolerance': 0, |
31 'location': [215, 215], | 31 'location': [215, 215], |
32 'size': [1, 1]}, | 32 'size': [1, 1]}, |
33 {'comment': 'body-l', | 33 {'comment': 'body-l', |
34 'color': [255, 255, 255], | 34 'color': [0, 128, 0], |
35 'tolerance': 0, | 35 'tolerance': 0, |
36 'location': [5, 215], | 36 'location': [5, 215], |
37 'size': [1, 1]}, | 37 'size': [1, 1]}, |
38 {'comment': 'background-t', | 38 {'comment': 'background-t', |
39 'color': [0, 0, 0], | 39 'color': [0, 0, 0], |
40 'tolerance': 0, | 40 'tolerance': 0, |
41 'location': [30, 30], | 41 'location': [30, 30], |
42 'size': [1, 1]}, | 42 'size': [1, 1]}, |
43 {'comment': 'background-r', | 43 {'comment': 'background-r', |
44 'color': [0, 0, 0], | 44 'color': [0, 0, 0], |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 class GpuRasterizationTestsStorySet(story_set_module.StorySet): | 126 class GpuRasterizationTestsStorySet(story_set_module.StorySet): |
127 | 127 |
128 """ Basic test cases for GPU rasterization. """ | 128 """ Basic test cases for GPU rasterization. """ |
129 | 129 |
130 def __init__(self, expectations): | 130 def __init__(self, expectations): |
131 super(GpuRasterizationTestsStorySet, self).__init__() | 131 super(GpuRasterizationTestsStorySet, self).__init__() |
132 | 132 |
133 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) | 133 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) |
134 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) | 134 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) |
OLD | NEW |