Commit eb46a2d6 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Ensure Pixel_Video_Context_Loss tests only crash once.

There are cases where we may get multiple canplaythrough events, we
need to ensure that ones beyond the first don't trigger crashes.

Bug: 1064635
Change-Id: I93ab49a5060e2dbbb39791e2e2193d47b6dd3959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2119643
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753447}
parent 893bb04d
<!DOCTYPE HTML> <!DOCTYPE HTML>
<!-- READ BEFORE UPDATING:
If this test is updated make sure to increment the "revision" value of the
associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure
that the baseline images are regenerated on the next run.
-->
<html> <html>
<head> <head>
<meta name="viewport" content="initial-scale=1"> <meta name="viewport" content="initial-scale=1">
...@@ -35,6 +28,9 @@ var QueryString = function() { ...@@ -35,6 +28,9 @@ var QueryString = function() {
}(); }();
function CrashGpuProcess() { function CrashGpuProcess() {
// Ensure we only get one crash in case of multiple canplaythrough events.
video.removeEventListener('canplaythrough', CrashGpuProcess, false);
// Create a canvas element and webgl context -- without a context, we won't // Create a canvas element and webgl context -- without a context, we won't
// get a webglcontextlost event. // get a webglcontextlost event.
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
......
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