testing/web-platform/tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html
Bug 1748573 [wpt PR 32242] - Update OffscreenCanvas variable name for tests, a=testonly
Automatic update from web-platform-tests
Update OffscreenCanvas variable name for tests
As part of the effort to unify the offscreencanvas and htmlcanvas tests,
the variable names that refer to the canvas is supposed to be the same
for both cases. Update all offscreencanvas variable name to canvas.
Bug:1275750
Change-Id: I82b5fe5ddac366838d31e15dabd78432a2a94786
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3330901
Reviewed-by: Juanmi Huertas <juanmihd@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/main@{#955484}
--
wpt-commits: 4f78b917b374b64d30bda6fe08d09fb3a85739e1
wpt-pr: 32242
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.fillStyle.get.semitransparent</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.get.semitransparent</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 = 'rgba(255,255,255,0.45)';
assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/);
t.done();
});
</script>