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): |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 super(GpuRasterizationConcavePathsPage, self).__init__( | 90 super(GpuRasterizationConcavePathsPage, self).__init__( |
91 url='file://../../data/gpu/concave_paths.html', | 91 url='file://../../data/gpu/concave_paths.html', |
92 page_set=story_set, | 92 page_set=story_set, |
93 name='GpuRasterization.ConcavePaths', | 93 name='GpuRasterization.ConcavePaths', |
94 expectations=expectations) | 94 expectations=expectations) |
95 | 95 |
96 self.expectations = [ | 96 self.expectations = [ |
97 {'comment': 'outside', | 97 {'comment': 'outside', |
98 'color': [255, 255, 255], | 98 'color': [255, 255, 255], |
99 'tolerance': 0, | 99 'tolerance': 0, |
100 'location': [5, 5], | 100 'location': [80, 60], |
| 101 'size': [1, 1]}, |
| 102 {'comment': 'outside', |
| 103 'color': [255, 255, 255], |
| 104 'tolerance': 0, |
| 105 'location': [28, 20], |
101 'size': [1, 1]}, | 106 'size': [1, 1]}, |
102 {'comment': 'inside', | 107 {'comment': 'inside', |
103 'color': [255, 215, 0], | 108 'color': [255, 215, 0], |
104 'tolerance': 0, | 109 'tolerance': 0, |
105 'location': [20, 50], | 110 'location': [32, 25], |
| 111 'size': [1, 1]}, |
| 112 {'comment': 'inside', |
| 113 'color': [255, 215, 0], |
| 114 'tolerance': 0, |
| 115 'location': [80, 80], |
106 'size': [1, 1]} | 116 'size': [1, 1]} |
107 ] | 117 ] |
108 self.test_rect = [0, 0, 100, 100] | 118 self.test_rect = [0, 0, 100, 100] |
109 | 119 |
110 def RunNavigateSteps(self, action_runner): | 120 def RunNavigateSteps(self, action_runner): |
111 super(GpuRasterizationConcavePathsPage, self).RunNavigateSteps( | 121 super(GpuRasterizationConcavePathsPage, self).RunNavigateSteps( |
112 action_runner) | 122 action_runner) |
113 action_runner.WaitForJavaScriptCondition( | 123 action_runner.WaitForJavaScriptCondition( |
114 'domAutomationController._finished', timeout_in_seconds=30) | 124 'domAutomationController._finished', timeout_in_seconds=30) |
115 | 125 |
116 class GpuRasterizationTestsStorySet(story_set_module.StorySet): | 126 class GpuRasterizationTestsStorySet(story_set_module.StorySet): |
117 | 127 |
118 """ Basic test cases for GPU rasterization. """ | 128 """ Basic test cases for GPU rasterization. """ |
119 | 129 |
120 def __init__(self, expectations): | 130 def __init__(self, expectations): |
121 super(GpuRasterizationTestsStorySet, self).__init__() | 131 super(GpuRasterizationTestsStorySet, self).__init__() |
122 | 132 |
123 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) | 133 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) |
124 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) | 134 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) |
OLD | NEW |