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): |