Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/initial.reset.clip.worker.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/initial.reset.clip.worker.js b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/initial.reset.clip.worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9df3d6aa54c19838de8f1f0264e80e1ecde256a6 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/the-offscreen-canvas/initial.reset.clip.worker.js |
@@ -0,0 +1,26 @@ |
+// DO NOT EDIT! This test has been generated by tools/gentest.py. |
+// OffscreenCanvas test in a worker:initial.reset.clip |
+// Description:Resetting the canvas state resets the current clip region |
+// Note: |
+ |
+importScripts("/resources/testharness.js"); |
+importScripts("/common/canvas-tests.js"); |
+ |
+var t = async_test("Resetting the canvas state resets the current clip region"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+offscreenCanvas2.width = 100; |
+ctx.rect(0, 0, 1, 1); |
+ctx.clip(); |
+offscreenCanvas2.width = 100; |
+ctx.fillStyle = '#0f0'; |
+ctx.fillRect(0, 0, 100, 50); |
+_assertPixel(offscreenCanvas, 20,20, 0,255,0,255, "20,20", "0,255,0,255"); |
+ |
+t.done(); |
+ |
+}); |
+done(); |