| 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 | 4 |
| 5 from gpu_tests import cloud_storage_test_base | 5 from gpu_tests import cloud_storage_test_base |
| 6 from gpu_tests import gpu_rasterization_expectations | 6 from gpu_tests import gpu_rasterization_expectations |
| 7 import page_sets | 7 import page_sets |
| 8 | 8 |
| 9 from telemetry.page import page_test | 9 from telemetry.page import page_test |
| 10 from telemetry.util import image_util | 10 from telemetry.util import image_util |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 test_rect[2], test_rect[3]) | 61 test_rect[2], test_rect[3]) |
| 62 | 62 |
| 63 self._ValidateScreenshotSamples( | 63 self._ValidateScreenshotSamples( |
| 64 tab, | 64 tab, |
| 65 page.display_name, | 65 page.display_name, |
| 66 screenshot, | 66 screenshot, |
| 67 page.expectations, | 67 page.expectations, |
| 68 device_pixel_ratio) | 68 device_pixel_ratio) |
| 69 | 69 |
| 70 | 70 |
| 71 class GpuRasterization(cloud_storage_test_base.TestBase): | 71 class GpuRasterization(cloud_storage_test_base.CloudStorageTestBase): |
| 72 """Tests that GPU rasterization produces valid content""" | 72 """Tests that GPU rasterization produces valid content""" |
| 73 test = GpuRasterizationValidator | 73 test = GpuRasterizationValidator |
| 74 | 74 |
| 75 def __init__(self, max_failures=None): | 75 def __init__(self, max_failures=None): |
| 76 super(GpuRasterization, self).__init__(max_failures=max_failures) | 76 super(GpuRasterization, self).__init__(max_failures=max_failures) |
| 77 | 77 |
| 78 @classmethod | 78 @classmethod |
| 79 def Name(cls): | 79 def Name(cls): |
| 80 return 'gpu_rasterization' | 80 return 'gpu_rasterization' |
| 81 | 81 |
| 82 def CreateStorySet(self, options): | 82 def CreateStorySet(self, options): |
| 83 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations()) | 83 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations()) |
| 84 for page in story_set: | 84 for page in story_set: |
| 85 page.script_to_evaluate_on_commit = test_harness_script | 85 page.script_to_evaluate_on_commit = test_harness_script |
| 86 return story_set | 86 return story_set |
| 87 | 87 |
| 88 def _CreateExpectations(self): | 88 def _CreateExpectations(self): |
| 89 return gpu_rasterization_expectations.GpuRasterizationExpectations() | 89 return gpu_rasterization_expectations.GpuRasterizationExpectations() |
| OLD | NEW |