Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.zero.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.zero.html b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.zero.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8c88cc9b6fb7ac735af9ad3f9a44e1a4273cb895 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.create2.zero.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> |
+<title>OffscreenCanvas test: 2d.imageData.create2.zero</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="/common/canvas-tests.js"></script> |
+ |
+<h1>2d.imageData.create2.zero</h1> |
+<p class="desc">createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero</p> |
+ |
+ |
+<script> |
+var t = async_test("createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+assert_throws("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); }); |
+assert_throws("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); }); |
+assert_throws("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); }); |
+ |
+t.done(); |
+ |
+}); |
+</script> |