author Yi Xu <yiyix@chromium.org>
Mon, 10 Jan 2022 11:16:48 +0000
changeset 604175 8c8326a5e1017f214639db0061c86bad7911f51d
parent 529326 d4e1e62aed03db1d447f6b31b8d1347c2ad2e43b
child 639088 f2a97d24502c07e6fd0eb21789d47a3fa092fe26
permissions -rw-r--r--
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.strokeRect.path</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>

<p class="desc">strokeRect does not affect the current path</p>

var t = async_test("strokeRect does not affect the current path");
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.rect(0, 0, 100, 50);
ctx.strokeStyle = '#f00';
ctx.lineWidth = 5;
ctx.strokeRect(0, 0, 16, 16);
ctx.fillStyle = '#0f0';
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");