Index: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.lineTo.nonfinite.details.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.lineTo.nonfinite.details.html b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.lineTo.nonfinite.details.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4ea2093795414000b9e4c9549b6a5c2ccd09f8ef |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/path-objects/2d.path.lineTo.nonfinite.details.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> |
+<title>OffscreenCanvas test: 2d.path.lineTo.nonfinite.details</title> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="/common/canvas-tests.js"></script> |
+ |
+<h1>2d.path.lineTo.nonfinite.details</h1> |
+<p class="desc">lineTo() with Infinity/NaN for first arg still converts the second arg</p> |
+ |
+ |
+<script> |
+var t = async_test("lineTo() with Infinity/NaN for first arg still converts the second arg"); |
+t.step(function() { |
+ |
+var offscreenCanvas = new OffscreenCanvas(100, 50); |
+var ctx = offscreenCanvas.getContext('2d'); |
+ |
+for (var arg1 of [Infinity, -Infinity, NaN]) { |
+ var converted = false; |
+ ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } }); |
+ _assert(converted, "converted"); |
+} |
+ |
+t.done(); |
+ |
+}); |
+</script> |