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

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

Issue 1463823002: Add DriverBugWorkaroundsInGpuProcessPage to gpu_process_test.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the fixes and only keep the test that check presence of the fake workaround Created 4 years, 8 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/test/gpu/gpu_tests/gpu_process.py ('k') | gpu/config/gpu_driver_bug_workaround_type.h » ('j') | 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 f1ce3eb42ce98128a251ba75fffe86d8440d864f..04fd7cc43f1e5b31b12d91f8ebec0ca2ddc01fdb 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -169,6 +169,42 @@ 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):
+ workaround = 'use_gpu_driver_workaround_for_testing'
+
+ browser_list = tab.EvaluateJavaScript('GetDriverBugWorkarounds()')
+ if not workaround in browser_list:
+ print 'Test failed. Printing page contents:'
+ print tab.EvaluateJavaScript('document.body.innerHTML')
+ raise page_test.Failure('%s missing in Browser process workarounds: %s' \
+ % (workaround, browser_list))
+
+ gpu_list = tab.EvaluateJavaScript( \
+ 'chrome.gpuBenchmarking.getGpuDriverBugWorkarounds()')
+ if not workaround in gpu_list:
+ print 'Test failed. Printing page contents:'
+ print tab.EvaluateJavaScript('document.body.innerHTML')
+ raise page_test.Failure('%s missing in GPU process workarounds: %s' \
+ % (workaround, gpu_list))
+
class GpuProcessTestsStorySet(story_set_module.StorySet):
""" Tests that accelerated content triggers the creation of a GPU process """
@@ -194,6 +230,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):
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_process.py ('k') | gpu/config/gpu_driver_bug_workaround_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698