layout/reftests/canvas/1447035-1.html
author Lee Salzman <lsalzman@mozilla.com>
Thu, 22 Mar 2018 14:34:29 -0400
changeset 409495 d3510733b9365dca3257603721658f8e89b6de2e
child 409496 4cf06e778dcffd807842cc0ec36b1239bcf60202
permissions -rw-r--r--
Bug 1447035 - test to verify that multiple accelerated canvases on the same page work. r=dholbert MozReview-Commit-ID: 5C6gfzMFPhq

<html>
<body onload="fillCanvas('white'); fillCanvas('purple');">
<script>
function fillCanvas(gradColor) {
    var c = document.getElementById(gradColor + 'Canvas');
    var ctx = c.getContext("2d");
    // Create gradient
    var grd = ctx.createRadialGradient(75,50,5,90,60,100);
    grd.addColorStop(0,gradColor);
    grd.addColorStop(1,gradColor);
    // Fill with gradient
    ctx.fillStyle = grd;
    ctx.fillRect(0,0,200,100);
}
</script>
<canvas id="whiteCanvas" width="200" height="100"></canvas>
<br>
<canvas id="purpleCanvas" width="200" height="100"></canvas>
</body>
</html>