Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..502921f61f0a9545c5ceb9433133482632801384 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js |
@@ -0,0 +1,42 @@ |
+// DO NOT EDIT! This test has been generated by tools/gentest.py. |
+// OffscreenCanvas test in a worker:2d.gradient.linear.nonfinite |
+// Description:createLinearGradient() throws TypeError if arguments are not finite |
+// Note: |
+ |
+importScripts("/resources/testharness.js"); |
+importScripts("/common/canvas-tests.js"); |
+ |
+var t = async_test("createLinearGradient() throws TypeError if arguments are not finite"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, NaN, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, NaN, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, 1, NaN); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); |
+assert_throws(new TypeError(), function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); |
+ |
+t.done(); |
+ |
+}); |
+done(); |