Commit 1e243609 authored by Kenneth Russell's avatar Kenneth Russell Committed by Commit Bot

Rewrite Pixel_WorkerRAF_OOPD as context_lost test.

The test seems to be timing out while taking a page screenshot after
the test completes, and this isn't the important part of the test.
Instead, rewrite it as a context_lost test, and include two variants:

  ContextLost_WorkerRAFAfterGPUCrash
  ContextLost_WorkerRAFAfterGPUCrash_OOPD

Tbr: fserb@chromium.org
Bug: 851213
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ib1556ad9f693003b6b216085a0b1665cad017314
Reviewed-on: https://chromium-review.googlesource.com/1197942Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587829}
parent 451b9a1a
......@@ -24,10 +24,11 @@ frame();
postMessage("READY");
</script>
<script>
var numFramesBeforeFail = 500;
var numFramesBeforeFail = 600;
function sendResult(status, detail) {
console.log(detail);
if (detail)
console.log(detail);
if (window.domAutomationController) {
window.domAutomationController.send(status);
} else {
......@@ -42,12 +43,14 @@ function main() {
worker.addEventListener("message", (ev) => {
if (ev.data == "READY") {
// Sending READY will make the GPU crash.
sendResult("READY");
// Sending LOADED will make the GPU crash.
sendResult("LOADED");
frame();
} else {
} else if (ev.data == "DONE") {
sendResult("SUCCESS", "Test complete");
done = true;
} else {
sendResult("FAILURE", "Unexpected reply from worker: " + ev.data);
}
});
......
......@@ -61,3 +61,8 @@ class ContextLostExpectations(GpuTestExpectations):
self.Fail('ContextLost_WebGLContextLostFromQuantity',
['android', ('qualcomm', 'Adreno (TM) 420')], bug=611906)
# Android NVIDIA (Nexus 9, SHIELD TV)
self.Fail('ContextLost_WorkerRAFAfterGPUCrash',
['android', 'nvidia'], bug=851213)
self.Fail('ContextLost_WorkerRAFAfterGPUCrash_OOPD',
['android', 'nvidia'], bug=851213)
......@@ -25,7 +25,7 @@ harness_script = r"""
domAutomationController._finished = false;
domAutomationController.send = function(msg) {
msg = msg.toLowerCase()
msg = msg.toLowerCase();
if (msg == "loaded") {
domAutomationController._loaded = true;
} else if (msg == "success") {
......@@ -90,7 +90,11 @@ class ContextLostIntegrationTest(gpu_integration_test.GpuIntegrationTest):
('ContextLost_WebGLBlockedAfterJSNavigation',
'webgl-domain-blocking-page1.html'),
('ContextLost_WebGLUnblockedAfterUserInitiatedReload',
'webgl-domain-unblocking.html'))
'webgl-domain-unblocking.html'),
('ContextLost_WorkerRAFAfterGPUCrash',
'worker-raf-after-gpu-crash.html'),
('ContextLost_WorkerRAFAfterGPUCrash_OOPD',
'worker-raf-after-gpu-crash.html'))
for t in tests:
yield (t[0], t[1], ('_' + t[0]))
......@@ -324,6 +328,26 @@ class ContextLostIntegrationTest(gpu_integration_test.GpuIntegrationTest):
'WebGL should have been unblocked after a user-initiated navigation')
self._RestartBrowser('must restart after tests that kill the GPU process')
def _ContextLost_WorkerRAFAfterGPUCrash(self, test_path):
self.RestartBrowserIfNecessaryWithArgs(self._AddDefaultArgs([
'--enable-experimental-web-platform-features'
]))
self.RestartBrowserIfNecessaryWithArgs(self._AddDefaultArgs([]))
self._NavigateAndWaitForLoad(test_path)
self._KillGPUProcess(1, False)
self._WaitForTabAndCheckCompletion()
self._RestartBrowser('must restart after tests that kill the GPU process')
def _ContextLost_WorkerRAFAfterGPUCrash_OOPD(self, test_path):
self.RestartBrowserIfNecessaryWithArgs(self._AddDefaultArgs([
'--enable-viz-display-compositor',
'--enable-experimental-web-platform-features'
]))
self._NavigateAndWaitForLoad(test_path)
self._KillGPUProcess(1, False)
self._WaitForTabAndCheckCompletion()
self._RestartBrowser('must restart after tests that kill the GPU process')
def load_tests(loader, tests, pattern):
del loader, tests, pattern # Unused.
return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__])
......@@ -117,7 +117,6 @@ class PixelExpectations(GpuTestExpectations):
# TODO(fserb): temporarily suppress this test.
self.Flaky('Pixel_OffscreenCanvas2DResizeOnWorker',
['linux', 'mac'], bug=840394)
self.Fail('Pixel_WorkerRAF_OOPD', ['android', 'nvidia'], bug=833902)
# TODO(kbr): temporary suppression for new test.
self.Flaky('Pixel_WebGLSadCanvas', ['linux', 'win'], bug=575305)
......
......@@ -395,9 +395,6 @@ def ExperimentalCanvasFeaturesPages(base_name):
unaccelerated_args = [
'--disable-accelerated-2d-canvas',
'--disable-gpu-compositing']
browser_args_oopd = [
'--enable-viz-display-compositor',
'--enable-experimental-web-platform-features']
return [
PixelTestPage(
......@@ -414,14 +411,6 @@ def ExperimentalCanvasFeaturesPages(base_name):
revision=8,
browser_args=browser_args),
PixelTestPage(
'pixel_worker_requestAnimationFrame.html',
base_name + '_WorkerRAF_OOPD',
test_rect=[0, 0, 1, 1],
revision=1,
optional_action='CrashGpuProcess',
browser_args=browser_args_oopd),
PixelTestPage(
'pixel_offscreenCanvas_webgl_paint_after_resize.html',
base_name + '_OffscreenCanvasWebGLPaintAfterResize',
......
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