Files
sousa-gecko/testing/web-platform/tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html
T
Jean-Philippe Gravel 4ad0c6e021 Bug 1941663 [wpt PR 50078] - Add meta charset=UTF-8 to the old canvas test generator, a=testonly
Automatic update from web-platform-tests
Add meta charset=UTF-8 to the old canvas test generator

The new canvas test generator uses this tag for all tests. Adding it to
the old generator will minimize the diff when we migrate the remaining
tests to the new generator.

Bug: 40207206
Change-Id: I791132321b281ae8fdfbc8dee9ac2aca5b72f7da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6172743
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Reviewed-by: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1406325}

--

wpt-commits: e9b613bdbb0f87399e270af3a10e1f61c86ea873
wpt-pr: 50078
2025-01-16 08:28:06 +00:00

34 lines
928 B
HTML

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<meta charset="UTF-8">
<title>OffscreenCanvas test: 2d.composite.solid.source-out</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.composite.solid.source-out</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(0, 255, 255, 1.0)';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'source-out';
ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5);
t.done();
});
</script>