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

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

Issue 1773073003: Make sure to run post init tasks even if kSkipGpuDataLoading is set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit 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
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | 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 e76b9c0ec390b231b9dd3ae5756e1936e7211cca..f1ce3eb42ce98128a251ba75fffe86d8440d864f 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -143,6 +143,32 @@ class SoftwareGpuProcessPage(gpu_test_base.PageBase):
expectations=expectations)
+class SkipGpuProcessSharedPageState(GpuProcessSharedPageState):
+ def __init__(self, test, finder_options, story_set):
+ super(SkipGpuProcessSharedPageState, self).__init__(
+ test, finder_options, story_set)
+ options = finder_options.browser_options
+
+ options.AppendExtraBrowserArgs('--disable-gpu')
+ options.AppendExtraBrowserArgs('--skip-gpu-data-loading')
+
+
+class SkipGpuProcessPage(gpu_test_base.PageBase):
+
+ def __init__(self, story_set, expectations):
+ super(SkipGpuProcessPage, self).__init__(
+ url='chrome:gpu',
+ name='GpuProcess.skip_gpu_process',
+ page_set=story_set,
+ shared_page_state_class=SkipGpuProcessSharedPageState,
+ expectations=expectations)
+
+ def Validate(self, tab, results):
+ has_gpu_process_js = 'chrome.gpuBenchmarking.hasGpuProcess()'
+ has_gpu_process = tab.EvaluateJavaScript(has_gpu_process_js)
+ if has_gpu_process:
+ raise page_test.Failure('GPU process detected')
+
class GpuProcessTestsStorySet(story_set_module.StorySet):
""" Tests that accelerated content triggers the creation of a GPU process """
@@ -167,6 +193,7 @@ class GpuProcessTestsStorySet(story_set_module.StorySet):
self.AddStory(GpuInfoCompletePage(self, expectations))
self.AddStory(NoGpuProcessPage(self, expectations))
self.AddStory(SoftwareGpuProcessPage(self, expectations))
+ self.AddStory(SkipGpuProcessPage(self, expectations))
@property
def allow_mixed_story_states(self):
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698