summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html')
-rw-r--r--testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html b/testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html
new file mode 100644
index 0000000000..5c76f3408a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/bg-color-with-gradient-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<body>
+ <canvas id="canvas" width="100" height="100"></canvas>
+</body>
+<script>
+ var canvas = document.getElementById('canvas');
+ var ctx = canvas.getContext('2d');
+ var grad = ctx.createLinearGradient(0, 0, 0, 100);
+ grad.addColorStop(0, 'red');
+ grad.addColorStop(1, 'black');
+ ctx.fillStyle = grad;
+ ctx.fillRect(0, 0, 100, 100);
+</script>