Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.get.length.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.get.length.html b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.get.length.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c9516d7a735e9f83e03b78438f26aacd2dd9f8f8 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.get.length.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> |
+<title>OffscreenCanvas test: 2d.imageData.get.length</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="/common/canvas-tests.js"></script> |
+ |
+<h1>2d.imageData.get.length</h1> |
+<p class="desc">getImageData() returns a correctly-sized Uint8ClampedArray</p> |
+ |
+ |
+<script> |
+var t = async_test("getImageData() returns a correctly-sized Uint8ClampedArray"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+var imgdata = ctx.getImageData(0, 0, 10, 10); |
+_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4"); |
+ |
+t.done(); |
+ |
+}); |
+</script> |