Commit 8b6d6b49 authored by James Darpinian's avatar James Darpinian Committed by Commit Bot

Fail WebGL tests if GPU process crashes.

Bug: 863221
Change-Id: Id2fe5975439c2d2cb5ee59c80f7c02a7fce3320d
Reviewed-on: https://chromium-review.googlesource.com/c/1318834Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605835}
parent d3bbe0e9
...@@ -72,6 +72,7 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -72,6 +72,7 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest):
_webgl_version = None _webgl_version = None
_is_asan = False _is_asan = False
_crash_count = 0
@classmethod @classmethod
def Name(cls): def Name(cls):
...@@ -189,13 +190,19 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest): ...@@ -189,13 +190,19 @@ class WebGLConformanceIntegrationTest(gpu_integration_test.GpuIntegrationTest):
getattr(self, test_name)(test_path, *args[1:]) getattr(self, test_name)(test_path, *args[1:])
def _NavigateTo(self, test_path, harness_script): def _NavigateTo(self, test_path, harness_script):
self._crash_count = self.browser.GetSystemInfo().gpu \
.aux_attributes['process_crash_count']
url = self.UrlOfStaticFilePath(test_path) url = self.UrlOfStaticFilePath(test_path)
self.tab.Navigate(url, script_to_evaluate_on_commit=harness_script) self.tab.Navigate(url, script_to_evaluate_on_commit=harness_script)
def _CheckTestCompletion(self): def _CheckTestCompletion(self):
self.tab.action_runner.WaitForJavaScriptCondition( self.tab.action_runner.WaitForJavaScriptCondition(
'webglTestHarness._finished', timeout=self._GetTestTimeout()) 'webglTestHarness._finished', timeout=self._GetTestTimeout())
if not self._DidWebGLTestSucceed(self.tab): if self._crash_count != self.browser.GetSystemInfo().gpu \
.aux_attributes['process_crash_count']:
self.fail('GPU process crashed during test.\n' +
self._WebGLTestMessages(self.tab))
elif not self._DidWebGLTestSucceed(self.tab):
self.fail(self._WebGLTestMessages(self.tab)) self.fail(self._WebGLTestMessages(self.tab))
def _RunConformanceTest(self, test_path, *args): def _RunConformanceTest(self, test_path, *args):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment