Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.round.worker.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.round.worker.js b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.round.worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b0c4a03ccb6f710bc5d77f7c556fc6e522bb0857 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.round.worker.js |
@@ -0,0 +1,23 @@ |
+// DO NOT EDIT! This test has been generated by tools/gentest.py. |
+// OffscreenCanvas test in a worker:2d.imageData.create2.round |
+// Description:createImageData(w, h) is rounded the same as getImageData(0, 0, w, h) |
+// Note: |
+ |
+importScripts("/resources/testharness.js"); |
+importScripts("/common/canvas-tests.js"); |
+ |
+var t = async_test("createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+var imgdata1 = ctx.createImageData(10.01, 10.99); |
+var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99); |
+_assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width"); |
+_assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height"); |
+ |
+t.done(); |
+ |
+}); |
+done(); |