testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html
author Cosmin Sabou <csabou@mozilla.com>
Sat, 12 Jul 2025 09:18:08 +0300 (12 hours ago)
changeset 796290 5ad1f0c58c82bdfa2f42fed870bbe143465398d0
parent 769655 1e3cc33c058c4c7b206cb48e18818baa2cd14dab
permissions -rw-r--r--
Revert "Bug 1977019 - re-enable hw video decoding testing. r=media-playback-reviewers,jolin" for causing win mda failures on test_hw_video_decoding.html This reverts commit 158474bdc0cf585b701bc47921f0a7d84f7bb84d.
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<meta charset="UTF-8">
<title>OffscreenCanvas test: 2d.fillStyle.parse.invalid.hex7</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.hex7</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 = '#ff0000f'; } 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);
  t.done();

});
</script>