<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="http://www.w3.org/TR/css3-color/#transparency">
<link rel="help" href="http://crbug.com/1296899">
<link rel="match" href="greensquare-ref.html">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<p>Test passes if you see a green square, and no red.</p>
<div style="position: absolute; width: 12em; height: 12em; background: red"></div>
<canvas id="canvas" style="position: relative; width: 12em; height: 12em; opacity: 0.2"></canvas>
<script>
  const ctx = canvas.getContext("2d");
  ctx.fillStyle = "green";
  ctx.fillRect(0, 0, canvas.width, canvas.height);
  waitForAtLeastOneFrame().then(() => {
    canvas.style.opacity = 1;
    takeScreenshot();
  });
</script>
</html>
