testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.invalid.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Thu, 26 May 2022 19:04:32 +0000
changeset 618971 a1b112c9da0712ae2ab1a77587b32410b97951cc
parent 529326 d4e1e62aed03db1d447f6b31b8d1347c2ad2e43b
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD es-AR -> c85f185f34a834895d755cde348530351ebb4835 eu -> 8ebe067658222f98ca856461394427dc3d74b135 fr -> 5887102b364eb8139189eafd56ef8afaea0dfba0 hu -> 12c637a0f2c1cf40e89bac39e2b0f7ec436216a6 it -> 35811aafe0c96a6fe1ebac94a87d40e8c70c0b30 sk -> 0e3d826ed292dfd9d5d6297f9140acabfed2fff2 zh-CN -> 89af38e4810f336cd981c56d733685d016f35e67 zh-TW -> acea5a2ae602b8729819e0b32600821921864979

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.line.miter.invalid</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
<body class="show_output">

<h1>2d.line.miter.invalid</h1>
<p class="desc">Setting miterLimit to invalid values is ignored</p>


<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
var t = async_test("Setting miterLimit to invalid values is ignored");
_addTest(function(canvas, ctx) {

ctx.miterLimit = 1.5;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = 0;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = -1;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = Infinity;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = -Infinity;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = NaN;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = 'string';
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");

ctx.miterLimit = 1.5;
ctx.miterLimit = true;
_assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");

ctx.miterLimit = 1.5;
ctx.miterLimit = false;
_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");


});
</script>