testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Wed, 25 May 2022 06:59:42 +0000
changeset 618796 3399ecb2fc4c375cd0110ffdf18a04e04395cbd5
parent 604175 8c8326a5e1017f214639db0061c86bad7911f51d
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD da -> 345f0d117ec12e01e798088f7eab03d63dbcae1c es-AR -> 5008da5104ab9c3a668b1afd1a6ae7901d8b905f es-CL -> 0f970e57544997fe43283f0e4d24e51b6373de82 et -> fa017ffe89319ac9a820858bf9a106776b45d9ed ia -> c304602f0b999e3100106f9e532149f111b6b922 is -> 6998af2ff6115c0456314dea3981768ecb67c157 pt-BR -> 398095bb5d9abc417ca501ce58b105f7ddca5f88 vi -> 83e057053e007e3ee19b2fb7a09d745ceaa9615f

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.fillStyle.parse.invalid.rgb-3</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>

<h1>2d.fillStyle.parse.invalid.rgb-3</h1>
<p class="desc"></p>


<script>
var t = async_test("");
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 = '#0f0';
try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
ctx.fillRect(0, 0, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");
t.done();

});
</script>