blob: 63a9ac352ef5b3034eae5d5152cc06d4087c381a [file] [log] [blame]
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.clearRect.globalcomposite</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<h1>2d.clearRect.globalcomposite</h1>
<p class="desc">clearRect is not affected by globalCompositeOperation</p>
<script>
var t = async_test("clearRect is not affected by globalCompositeOperation");
t.step(function() {
var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-atop';
ctx.clearRect(0, 0, 100, 50);
_assertPixel(offscreenCanvas, 50,25, 0,0,0,0, "50,25", "0,0,0,0");
t.done();
});
</script>