Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-gradients-in-worker-expected.html

Issue 1919363002: Add createGradient and createPattern to OffscreenCanvas2D in worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScriptState Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-gradients-in-worker-expected.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-gradients-in-worker-expected.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-gradients-in-worker-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..b6e598ac6cc2654926d04042b60abe62c02c775d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-gradients-in-worker-expected.html
@@ -0,0 +1,29 @@
+
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id ='output' width='200' height='200'></canvas>
+<script>
+var aCanvas = document.getElementById('output');
+var ctx = aCanvas.getContext('2d');
+
+var radialGrad = ctx.createRadialGradient(100, 100, 100, 100, 100, 0);
+radialGrad.addColorStop(0, "#fff");
+radialGrad.addColorStop(1, "#0f0");
+
+ctx.fillStyle = radialGrad;
+ctx.fillRect(0, 0, 200, 200);
+
+var linearGrad = ctx.createLinearGradient(0, 0, 200, 200);
+linearGrad.addColorStop(0, "#f00");
+linearGrad.addColorStop(1, "#ff0");
+
+ctx.strokeStyle = linearGrad;
+ctx.lineWidth = "3";
+ctx.beginPath();
+ctx.moveTo(0, 0);
+ctx.lineTo(200, 200);
+ctx.stroke();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698