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

Unified Diff: content/test/gpu/page_sets/gpu_process_tests.py

Issue 2195743005: Fix ineffective --disable-gpu-driver-bug-workarounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/page_sets/gpu_process_tests.py
diff --git a/content/test/gpu/page_sets/gpu_process_tests.py b/content/test/gpu/page_sets/gpu_process_tests.py
index 234e412a41d217a3c4887fc29a6fa9b1fca44ddf..9083a5e08f1fb5817cc6b6bf46ca610a3764dd6b 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -569,6 +569,37 @@ class NoTransparentVisualsGpuProcessPage(DriverBugWorkaroundsTestsPage):
super(NoTransparentVisualsGpuProcessPage, self).Validate(tab, results)
+class OnlyOneWorkaroundSharedPageState(GpuProcessSharedPageState):
+ def __init__(self, test, finder_options, story_set):
+ super(OnlyOneWorkaroundSharedPageState, self).__init__(
+ test, finder_options, story_set)
+ options = finder_options.browser_options
+ options.AppendExtraBrowserArgs('--disable-gpu-driver-bug-workarounds')
+ options.AppendExtraBrowserArgs('--use_gpu_driver_workaround_for_testing')
+
+class OnlyOneWorkaroundPage(gpu_test_base.PageBase):
+ def __init__(self, story_set, expectations):
+ super(OnlyOneWorkaroundPage, self).__init__(
+ url='chrome:gpu',
+ name='GpuProcess.only_one_workaround',
+ page_set=story_set,
+ shared_page_state_class=OnlyOneWorkaroundSharedPageState,
+ expectations=expectations)
+
+ def Validate(self, tab, results):
+ browser_list = tab.EvaluateJavaScript('GetDriverBugWorkarounds()')
+ gpu_list = tab.EvaluateJavaScript( \
+ 'chrome.gpuBenchmarking.getGpuDriverBugWorkarounds()')
+
+ if browser_list != ['use_gpu_driver_workaround_for_testing'] or \
+ gpu_list != browser_list:
+ print 'Test failed. Printing page contents:'
+ print tab.EvaluateJavaScript('document.body.innerHTML')
+ raise page_test.Failure('Browser or GPU process lists are not reduced ' \
+ 'to only force_discrete_gpu workaround: %s != %s' % \
Ken Russell (switch to Gerrit) 2016/08/01 21:53:50 Should this be "to only use_gpu_driver_workaround_
Julien Isorce Samsung 2016/08/02 13:12:19 Done, thx!
+ (browser_list, gpu_list))
+
+
class GpuProcessTestsStorySet(story_set_module.StorySet):
""" Tests that accelerated content triggers the creation of a GPU process """
@@ -602,6 +633,8 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
expectations))
+ self.AddStory(OnlyOneWorkaroundPage(self, expectations))
+
if not is_platform_android:
self.AddStory(SkipGpuProcessPage(self, expectations))
self.AddStory(HasTransparentVisualsGpuProcessPage(self, expectations))
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698