Chromium Code Reviews| 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)) |