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

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

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Execute todo, send IPC directly from gpu_benchmarking_extension.cc and fixes variable names. Created 4 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 gpu_tests import gpu_process_expectations as expectations 4 from gpu_tests import gpu_process_expectations as expectations
5 from gpu_tests import gpu_test_base 5 from gpu_tests import gpu_test_base
6 import page_sets 6 import page_sets
7 7
8 from telemetry.page import page_test 8 from telemetry.page import page_test
9 9
10 test_harness_script = r""" 10 test_harness_script = r"""
(...skipping 12 matching lines...) Expand all
23 super(GpuProcessValidator, self).__init__( 23 super(GpuProcessValidator, self).__init__(
24 needs_browser_restart_after_each_page=True) 24 needs_browser_restart_after_each_page=True)
25 25
26 def CustomizeBrowserOptions(self, options): 26 def CustomizeBrowserOptions(self, options):
27 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking') 27 options.AppendExtraBrowserArgs('--enable-gpu-benchmarking')
28 28
29 def ValidateAndMeasurePage(self, page, tab, results): 29 def ValidateAndMeasurePage(self, page, tab, results):
30 if hasattr(page, 'Validate'): 30 if hasattr(page, 'Validate'):
31 page.Validate(tab, results) 31 page.Validate(tab, results)
32 else: 32 else:
33 has_gpu_process_js = 'chrome.gpuBenchmarking.hasGpuProcess()' 33 has_gpu_channel_js = 'chrome.gpuBenchmarking.hasGpuChannel()'
34 has_gpu_process = tab.EvaluateJavaScript(has_gpu_process_js) 34 has_gpu_channel = tab.EvaluateJavaScript(has_gpu_channel_js)
35 if not has_gpu_process: 35 if not has_gpu_channel:
36 raise page_test.Failure('No GPU process detected') 36 raise page_test.Failure('No GPU channel detected')
37 37
38 class GpuProcess(gpu_test_base.TestBase): 38 class GpuProcess(gpu_test_base.TestBase):
39 """Tests that accelerated content triggers the creation of a GPU process""" 39 """Tests that accelerated content triggers the creation of a GPU process"""
40 test = GpuProcessValidator 40 test = GpuProcessValidator
41 41
42 @classmethod 42 @classmethod
43 def Name(cls): 43 def Name(cls):
44 return 'gpu_process' 44 return 'gpu_process'
45 45
46 def _CreateExpectations(self): 46 def _CreateExpectations(self):
47 return expectations.GpuProcessExpectations() 47 return expectations.GpuProcessExpectations()
48 48
49 def CreateStorySet(self, options): 49 def CreateStorySet(self, options):
50 story_set = page_sets.GpuProcessTestsStorySet(self.GetExpectations()) 50 story_set = page_sets.GpuProcessTestsStorySet(self.GetExpectations())
51 for page in story_set: 51 for page in story_set:
52 page.script_to_evaluate_on_commit = test_harness_script 52 page.script_to_evaluate_on_commit = test_harness_script
53 return story_set 53 return story_set
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | content/test/gpu/page_sets/gpu_process_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698