| 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 16 matching lines...) Expand all Loading... |
| 27 window.domAutomationController = domAutomationController; | 27 window.domAutomationController = domAutomationController; |
| 28 """ | 28 """ |
| 29 | 29 |
| 30 def _DidTestSucceed(tab): | 30 def _DidTestSucceed(tab): |
| 31 return tab.EvaluateJavaScript('domAutomationController._succeeded') | 31 return tab.EvaluateJavaScript('domAutomationController._succeeded') |
| 32 | 32 |
| 33 class GpuRasterizationValidator(cloud_storage_test_base.ValidatorBase): | 33 class GpuRasterizationValidator(cloud_storage_test_base.ValidatorBase): |
| 34 def CustomizeBrowserOptions(self, options): | 34 def CustomizeBrowserOptions(self, options): |
| 35 # --test-type=gpu is used only to suppress the "Google API Keys are missing" | 35 # --test-type=gpu is used only to suppress the "Google API Keys are missing" |
| 36 # infobar, which causes flakiness in tests. | 36 # infobar, which causes flakiness in tests. |
| 37 options.AppendExtraBrowserArgs(['--enable-threaded-compositing', | 37 options.AppendExtraBrowserArgs(['--force-gpu-rasterization', |
| 38 '--enable-impl-side-painting', | |
| 39 '--force-gpu-rasterization', | |
| 40 '--enable-gpu-benchmarking', | |
| 41 '--test-type=gpu']) | 38 '--test-type=gpu']) |
| 42 | 39 |
| 43 def ValidateAndMeasurePage(self, page, tab, results): | 40 def ValidateAndMeasurePage(self, page, tab, results): |
| 44 if not _DidTestSucceed(tab): | 41 if not _DidTestSucceed(tab): |
| 45 raise page_test.Failure('Page indicated a failure') | 42 raise page_test.Failure('Page indicated a failure') |
| 46 | 43 |
| 47 if not hasattr(page, 'expectations') or not page.expectations: | 44 if not hasattr(page, 'expectations') or not page.expectations: |
| 48 raise page_test.Failure('Expectations not specified') | 45 raise page_test.Failure('Expectations not specified') |
| 49 | 46 |
| 50 if not tab.screenshot_supported: | 47 if not tab.screenshot_supported: |
| (...skipping 29 matching lines...) Expand all Loading... |
| 80 return 'gpu_rasterization' | 77 return 'gpu_rasterization' |
| 81 | 78 |
| 82 def CreateStorySet(self, options): | 79 def CreateStorySet(self, options): |
| 83 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations()) | 80 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations()) |
| 84 for page in story_set: | 81 for page in story_set: |
| 85 page.script_to_evaluate_on_commit = test_harness_script | 82 page.script_to_evaluate_on_commit = test_harness_script |
| 86 return story_set | 83 return story_set |
| 87 | 84 |
| 88 def _CreateExpectations(self): | 85 def _CreateExpectations(self): |
| 89 return gpu_rasterization_expectations.GpuRasterizationExpectations() | 86 return gpu_rasterization_expectations.GpuRasterizationExpectations() |
| OLD | NEW |