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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-pattern-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-pattern-in-worker-expected.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-pattern-in-worker-expected.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-pattern-in-worker-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..480bd9a11b205a547afe078bf27a9c9275391e0b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-pattern-in-worker-expected.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<body>
+<canvas id ='output' width='150' height='150'></canvas>
+<script>
+var aCanvas = document.getElementById('output');
+var ctx = aCanvas.getContext('2d');
+
+var patternCanvas = document.createElement('canvas');
+patternCanvas.width = 30;
+patternCanvas.height = 30;
+var patternCtx = patternCanvas.getContext('2d');
+patternCtx.fillStyle = '#f00';
+patternCtx.fillRect(0, 0, 15, 15);
+patternCtx.fillStyle = '#0f0';
+patternCtx.fillRect(15, 0, 15, 15);
+patternCtx.fillStyle = '#00f';
+patternCtx.fillRect(0, 15, 15, 15);
+patternCtx.fillStyle = "#ff0";
+patternCtx.fillRect(15, 15, 15, 15);
+
+var myPattern = ctx.createPattern(patternCanvas, 'repeat');
+ctx.fillStyle = myPattern;
+ctx.fillRect(0, 0, aCanvas.width, aCanvas.height);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698