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

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

Issue 1982323003: Add EqualBugWorkaroundsInBrowserAndGpuProcessPage to gpu_process_test.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebase Created 4 years, 7 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 | « no previous file | 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 441558277498b7c51e5201e9c0e9c1402422950c..ed9301470940b2ed682f827ddc9fafc713aa5fd1 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -498,6 +498,30 @@ class ReadbackWebGLGpuProcessPage(gpu_test_base.PageBase):
raise page_test.Failure('WebGL readback setup failed: %s' \
% feature_status_list)
+
+class EqualBugWorkaroundsInBrowserAndGpuProcessPage(gpu_test_base.PageBase):
+ def __init__(self, story_set, expectations):
+ super(EqualBugWorkaroundsInBrowserAndGpuProcessPage, self).__init__(
+ url='chrome:gpu',
+ name='GpuProcess.equal_bug_workarounds_in_browser_and_gpu_process',
+ page_set=story_set,
+ shared_page_state_class=GpuProcessSharedPageState,
+ expectations=expectations)
+
+ def Validate(self, tab, results):
+ browser_list = tab.EvaluateJavaScript('GetDriverBugWorkarounds()')
+ gpu_list = tab.EvaluateJavaScript( \
+ 'chrome.gpuBenchmarking.getGpuDriverBugWorkarounds()')
+
+ diff = set(browser_list).symmetric_difference(set(gpu_list))
+ if len(diff) > 0:
+ 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: %s != %s, diff: %s' % \
+ (browser_list, gpu_list, list(diff)))
+
+
class GpuProcessTestsStorySet(story_set_module.StorySet):
""" Tests that accelerated content triggers the creation of a GPU process """
@@ -531,6 +555,8 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(IdentifyActiveGpuPage4(self, expectations))
self.AddStory(ReadbackWebGLGpuProcessPage(self, expectations))
self.AddStory(DriverBugWorkaroundsUponGLRendererPage(self, expectations))
+ self.AddStory(EqualBugWorkaroundsInBrowserAndGpuProcessPage(self,
+ expectations))
@property
def allow_mixed_story_states(self):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698