blob: 76b239bf432cc3a1078d9687d1bdcd9ceb93985a [file] [log] [blame]
<body>
<canvas id="c" width="600" height="100"></canvas>
<script>
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
var canvas = document.getElementById("c");
var ctx = canvas.getContext("2d");
var gradient = ctx.createLinearGradient(0, 0, 0, 100);
gradient.addColorStop(0.4, "#f00");
gradient.addColorStop(0.6, "#00f");
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, 100, 100);
gradient.addColorStop(0, "#fff");
gradient.addColorStop(1, "#fff");
ctx.fillStyle = gradient;
ctx.fillRect(150, 0, 100, 100);
</script>
</body>