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': [80, 60], | 100 'location': [5, 5], |
101 'size': [1, 1]}, | |
102 {'comment': 'outside', | |
103 'color': [255, 255, 255], | |
104 'tolerance': 0, | |
105 'location': [28, 20], | |
106 'size': [1, 1]}, | 101 'size': [1, 1]}, |
107 {'comment': 'inside', | 102 {'comment': 'inside', |
108 'color': [255, 215, 0], | 103 'color': [255, 215, 0], |
109 'tolerance': 0, | 104 'tolerance': 0, |
110 'location': [32, 25], | 105 'location': [20, 50], |
111 'size': [1, 1]}, | |
112 {'comment': 'inside', | |
113 'color': [255, 215, 0], | |
114 'tolerance': 0, | |
115 'location': [80, 80], | |
116 'size': [1, 1]} | 106 'size': [1, 1]} |
117 ] | 107 ] |
118 self.test_rect = [0, 0, 100, 100] | 108 self.test_rect = [0, 0, 100, 100] |
119 | 109 |
120 def RunNavigateSteps(self, action_runner): | 110 def RunNavigateSteps(self, action_runner): |
121 super(GpuRasterizationConcavePathsPage, self).RunNavigateSteps( | 111 super(GpuRasterizationConcavePathsPage, self).RunNavigateSteps( |
122 action_runner) | 112 action_runner) |
123 action_runner.WaitForJavaScriptCondition( | 113 action_runner.WaitForJavaScriptCondition( |
124 'domAutomationController._finished', timeout_in_seconds=30) | 114 'domAutomationController._finished', timeout_in_seconds=30) |
125 | 115 |
126 class GpuRasterizationTestsStorySet(story_set_module.StorySet): | 116 class GpuRasterizationTestsStorySet(story_set_module.StorySet): |
127 | 117 |
128 """ Basic test cases for GPU rasterization. """ | 118 """ Basic test cases for GPU rasterization. """ |
129 | 119 |
130 def __init__(self, expectations): | 120 def __init__(self, expectations): |
131 super(GpuRasterizationTestsStorySet, self).__init__() | 121 super(GpuRasterizationTestsStorySet, self).__init__() |
132 | 122 |
133 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) | 123 self.AddStory(GpuRasterizationBlueBoxPage(self, expectations)) |
134 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) | 124 self.AddStory(GpuRasterizationConcavePathsPage(self, expectations)) |
OLD | NEW |