testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Thu, 26 May 2022 19:04:32 +0000
changeset 618971 a1b112c9da0712ae2ab1a77587b32410b97951cc
parent 604175 8c8326a5e1017f214639db0061c86bad7911f51d
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>OffscreenCanvas test: 2d.transformation.transform.nonfinite</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>

<h1>2d.transformation.transform.nonfinite</h1>
<p class="desc">transform() with Infinity/NaN is ignored</p>


<script>
var t = async_test("transform() with Infinity/NaN is ignored");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
    throw reason;
});
t.step(function() {

var canvas = new OffscreenCanvas(100, 50);
var ctx = canvas.getContext('2d');

ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
ctx.translate(100, 10);
ctx.transform(Infinity, 0, 0, 0, 0, 0);
ctx.transform(-Infinity, 0, 0, 0, 0, 0);
ctx.transform(NaN, 0, 0, 0, 0, 0);
ctx.transform(0, Infinity, 0, 0, 0, 0);
ctx.transform(0, -Infinity, 0, 0, 0, 0);
ctx.transform(0, NaN, 0, 0, 0, 0);
ctx.transform(0, 0, Infinity, 0, 0, 0);
ctx.transform(0, 0, -Infinity, 0, 0, 0);
ctx.transform(0, 0, NaN, 0, 0, 0);
ctx.transform(0, 0, 0, Infinity, 0, 0);
ctx.transform(0, 0, 0, -Infinity, 0, 0);
ctx.transform(0, 0, 0, NaN, 0, 0);
ctx.transform(0, 0, 0, 0, Infinity, 0);
ctx.transform(0, 0, 0, 0, -Infinity, 0);
ctx.transform(0, 0, 0, 0, NaN, 0);
ctx.transform(0, 0, 0, 0, 0, Infinity);
ctx.transform(0, 0, 0, 0, 0, -Infinity);
ctx.transform(0, 0, 0, 0, 0, NaN);
ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
ctx.transform(0, Infinity, Infinity, 0, 0, 0);
ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
ctx.transform(0, Infinity, 0, Infinity, 0, 0);
ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
ctx.transform(0, Infinity, 0, 0, Infinity, 0);
ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
ctx.transform(0, Infinity, 0, 0, 0, Infinity);
ctx.transform(0, 0, Infinity, Infinity, 0, 0);
ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
ctx.transform(0, 0, Infinity, 0, Infinity, 0);
ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
ctx.transform(0, 0, Infinity, 0, 0, Infinity);
ctx.transform(0, 0, 0, Infinity, Infinity, 0);
ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
ctx.transform(0, 0, 0, Infinity, 0, Infinity);
ctx.transform(0, 0, 0, 0, Infinity, Infinity);
ctx.fillStyle = '#0f0';
ctx.fillRect(-100, -10, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
t.done();

});
</script>