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 f1ce3eb42ce98128a251ba75fffe86d8440d864f..bc4dde2230155b3a2cfc739fdb53e593c73c35dc 100644 |
--- a/content/test/gpu/page_sets/gpu_process_tests.py |
+++ b/content/test/gpu/page_sets/gpu_process_tests.py |
@@ -169,6 +169,33 @@ class SkipGpuProcessPage(gpu_test_base.PageBase): |
if has_gpu_process: |
raise page_test.Failure('GPU process detected') |
+ |
+class DriverBugWorkaroundsSharedPageState(GpuProcessSharedPageState): |
+ def __init__(self, test, finder_options, story_set): |
+ super(DriverBugWorkaroundsSharedPageState, self).__init__( |
+ test, finder_options, story_set) |
+ options = finder_options.browser_options |
+ options.AppendExtraBrowserArgs('--use_gpu_driver_workaround_for_testing') |
+ |
+ |
+class DriverBugWorkaroundsInGpuProcessPage(gpu_test_base.PageBase): |
+ def __init__(self, story_set, expectations): |
+ super(DriverBugWorkaroundsInGpuProcessPage, self).__init__( |
+ url='chrome:gpu', |
+ name='GpuProcess.driver_bug_workarounds_in_gpu_process', |
+ page_set=story_set, |
+ shared_page_state_class=DriverBugWorkaroundsSharedPageState, |
+ expectations=expectations) |
+ |
+ def Validate(self, tab, results): |
+ if not tab.EvaluateJavaScript('VerifyDriverBugWorkaroundIsPresent("%s")' |
+ % 'use_gpu_driver_workaround_for_testing'): |
+ print 'Test failed. Printing page contents:' |
+ print tab.EvaluateJavaScript('document.body.innerHTML') |
+ raise page_test.Failure('Browser and GPU process list of driver bug \ |
+ workarounds are not equal') |
+ |
+ |
class GpuProcessTestsStorySet(story_set_module.StorySet): |
""" Tests that accelerated content triggers the creation of a GPU process """ |
@@ -194,6 +221,7 @@ class GpuProcessTestsStorySet(story_set_module.StorySet): |
self.AddStory(NoGpuProcessPage(self, expectations)) |
self.AddStory(SoftwareGpuProcessPage(self, expectations)) |
self.AddStory(SkipGpuProcessPage(self, expectations)) |
+ self.AddStory(DriverBugWorkaroundsInGpuProcessPage(self, expectations)) |
@property |
def allow_mixed_story_states(self): |