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

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: add a testing GpuChannelMsg_GetDriverBugWorkArounds IPC message and use it in a new browser test Created 4 years, 9 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
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..bcaec8428e4f6d15da08232861d95cf1c1df35d9 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_testing_gpu_driver_workaround')
Ken Russell (switch to Gerrit) 2016/03/30 22:17:42 Update per naming nit below.
Julien Isorce Samsung 2016/03/31 15:20:09 Done.
+
+
+class DriverBugWorkaroundsGpuProcessPage(gpu_test_base.PageBase):
Ken Russell (switch to Gerrit) 2016/03/30 22:17:41 nit: DriverBugWorkaroundsInGpuProcessPage
Julien Isorce Samsung 2016/03/31 15:20:09 Done.
+ def __init__(self, story_set, expectations):
+ super(DriverBugWorkaroundsGpuProcessPage, self).__init__(
+ url='chrome:gpu',
+ name='GpuProcess.driver_bug_workarounds_gpu_process',
Ken Russell (switch to Gerrit) 2016/03/30 22:17:41 nit: driver_bug_workarounds_in_gpu_process
Julien Isorce Samsung 2016/03/31 15:20:09 Done.
+ page_set=story_set,
+ shared_page_state_class=DriverBugWorkaroundsSharedPageState,
+ expectations=expectations)
+
+ def Validate(self, tab, results):
+ if not tab.EvaluateJavaScript('VerifyDriverBugWorkarounds("%s")'
+ % 'use_testing_gpu_driver_workaround'):
Ken Russell (switch to Gerrit) 2016/03/30 22:17:41 Update name.
Julien Isorce Samsung 2016/03/31 15:20:09 Done.
+ print 'Test failed. Printing page contents:'
+ print tab.EvaluateJavaScript('document.body.innerHTML')
+ raise page_test.Failure('browser and gpu process list of driver bug \
Ken Russell (switch to Gerrit) 2016/03/30 22:17:42 Grammar nit: "Browser\'s and GPU process\'s lists
Julien Isorce Samsung 2016/03/31 15:20:09 Done.
+ workarounds are not equals')
Ken Russell (switch to Gerrit) 2016/03/30 22:17:41 Is this really what this test verifies -- that the
Julien Isorce Samsung 2016/03/31 15:20:09 Let me explain why I think it does, but maybe I am
+
+
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(DriverBugWorkaroundsGpuProcessPage(self, expectations))
@property
def allow_mixed_story_states(self):

Powered by Google App Engine
This is Rietveld 408576698