Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/compositing/2d.composite.transparent.destination-atop.worker.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/compositing/2d.composite.transparent.destination-atop.worker.js b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/compositing/2d.composite.transparent.destination-atop.worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bc036b225ab1ee08cac680a5f1a7e54987d51c7d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/compositing/2d.composite.transparent.destination-atop.worker.js |
@@ -0,0 +1,26 @@ |
+// DO NOT EDIT! This test has been generated by tools/gentest.py. |
+// OffscreenCanvas test in a worker:2d.composite.transparent.destination-atop |
+// Description: |
+// Note: |
+ |
+importScripts("/resources/testharness.js"); |
+importScripts("/common/canvas-tests.js"); |
+ |
+var t = async_test(""); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+ |
+ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; |
+ctx.fillRect(0, 0, 100, 50); |
+ctx.globalCompositeOperation = 'destination-atop'; |
+ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; |
+ctx.fillRect(0, 0, 100, 50); |
+_assertPixelApprox(offscreenCanvas, 50,25, 0,128,128,191, "50,25", "0,128,128,191", 5); |
+ |
+t.done(); |
+ |
+}); |
+done(); |