Commit 4565f148 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Reland #3: Add vp9-alpha + canvas layout test.

Rework test to avoid playback, since the timing of the opacity
update is unpredictable across platforms and may race with the
test's pixel capture.

--------------[ Original Description Below ]--------------

Same as the last reland but waits for a requestAnimationFrame
cycle to ensure the video surface layer has been painted.

--------------[ Original Description Below ]--------------

Simply moves the win7 expectation to win since they both use the
same one. Formats the HTML and adds a title too. Adds an
expectation for Linux which seems to have changed since last
landing...

--------------[ Original Description Below ]--------------

Apparently we don't have any vpx-alpha layout tests, hence macOS has
had broken support here for some time.

BUG=919015
TEST=fails without the macOS alpha fix.
TBR=dcastagna

Change-Id: I74eb6922e95de8171710f421450e9b69b8e26208
Reviewed-on: https://chromium-review.googlesource.com/c/1480709Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634488}
parent 79f1c488
<!doctype html>
<title>Verify VP9+Alpha video playback and canvas interact correctly.</title>
<style>
body { background: white; }
video, canvas { background: pink; }
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function startTest() {
var video = document.querySelector('video');
video.oncanplaythrough = function() {
var canvas = document.querySelector('canvas');
var ctx = canvas.getContext('2d');
// This will squish the video a bit, but it doesn't matter for this test.
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
// Wait for request animation frame to ensure the video frame is drawn.
if (window.testRunner)
window.requestAnimationFrame(_ => { testRunner.notifyDone(); });
}
video.src = "resources/white-square-vp9a.webm";
}
</script>
<body onload="startTest();">
<video width="320" height="240"></video>
<canvas width="320" height="240"></canvas>
</body>
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