Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(945)

Side by Side Diff: content/test/gpu/gpu_tests/gpu_rasterization.py

Issue 1413883003: Add a presubmit script and pylintrc for content/test/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 import cloud_storage_test_base 5 from gpu_tests import cloud_storage_test_base
6 import gpu_rasterization_expectations 6 from gpu_tests import gpu_rasterization_expectations
7 import optparse
8 import page_sets 7 import page_sets
9 8
9 from telemetry.page import page_test
10 from telemetry.util import image_util 10 from telemetry.util import image_util
11 11
12 12
13 test_harness_script = r""" 13 test_harness_script = r"""
14 var domAutomationController = {}; 14 var domAutomationController = {};
15 domAutomationController._succeeded = false; 15 domAutomationController._succeeded = false;
16 domAutomationController._finished = false; 16 domAutomationController._finished = false;
17 17
18 domAutomationController.setAutomationId = function(id) {} 18 domAutomationController.setAutomationId = function(id) {}
19 domAutomationController.send = function(msg) { 19 domAutomationController.send = function(msg) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 page.display_name, 64 page.display_name,
65 screenshot, 65 screenshot,
66 page.expectations, 66 page.expectations,
67 device_pixel_ratio) 67 device_pixel_ratio)
68 68
69 69
70 class GpuRasterization(cloud_storage_test_base.TestBase): 70 class GpuRasterization(cloud_storage_test_base.TestBase):
71 """Tests that GPU rasterization produces valid content""" 71 """Tests that GPU rasterization produces valid content"""
72 test = GpuRasterizationValidator 72 test = GpuRasterizationValidator
73 73
74 def __init__(self, max_failures=None):
Ken Russell (switch to Gerrit) 2015/10/21 22:12:08 Unfortunate that useless code has to be added to a
Corentin Wallez 2015/10/21 23:07:25 Yes, this makes me sad too.
75 cloud_storage_test_base.TestBase.__init__(self, max_failures=max_failures)
76
74 @classmethod 77 @classmethod
75 def Name(cls): 78 def Name(cls):
76 return 'gpu_rasterization' 79 return 'gpu_rasterization'
77 80
78 def CreateStorySet(self, options): 81 def CreateStorySet(self, options):
79 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations()) 82 story_set = page_sets.GpuRasterizationTestsStorySet(self.GetExpectations())
80 for page in story_set: 83 for page in story_set:
81 page.script_to_evaluate_on_commit = test_harness_script 84 page.script_to_evaluate_on_commit = test_harness_script
82 return story_set 85 return story_set
83 86
84 def _CreateExpectations(self): 87 def _CreateExpectations(self):
85 return gpu_rasterization_expectations.GpuRasterizationExpectations() 88 return gpu_rasterization_expectations.GpuRasterizationExpectations()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698