Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / gradient-add-second-start-end-stop.html
blob76b239bf432cc3a1078d9687d1bdcd9ceb93985a
1 <body>
2 <canvas id="c" width="600" height="100"></canvas>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsTextWithPixelResults();
7 var canvas = document.getElementById("c");
8 var ctx = canvas.getContext("2d");
10 var gradient = ctx.createLinearGradient(0, 0, 0, 100);
11 gradient.addColorStop(0.4, "#f00");
12 gradient.addColorStop(0.6, "#00f");
14 ctx.fillStyle = gradient;
15 ctx.fillRect(0, 0, 100, 100);
17 gradient.addColorStop(0, "#fff");
18 gradient.addColorStop(1, "#fff");
19 ctx.fillStyle = gradient;
20 ctx.fillRect(150, 0, 100, 100);
21 </script>
22 </body>