testing/web-platform/tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Tue, 24 May 2022 06:57:56 +0000
changeset 618573 eeff404229054a7c671e97e60e50b73c603cc78a
parent 604175 8c8326a5e1017f214639db0061c86bad7911f51d
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD it -> e3ccb400d668c2d011038e74337866aac8f72f2d oc -> 65e529545e4250ea0e02f3b51a8f57bcae311091 zh-TW -> deebd17bb96799602a2f6aae4958a087b93015d1

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.transformation.rotate.direction</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.rotate.direction</h1>
<p class="desc">rotate() is clockwise</p>


<script>
var t = async_test("rotate() is clockwise");
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.rotate(Math.PI / 2);
ctx.fillStyle = '#0f0';
ctx.fillRect(0, -100, 50, 100);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
t.done();

});
</script>