https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 48d5c9b147ef862c719e5ffc75c358ab7b95ea1a authored by Jungkee Song on 23 March 2018, 14:51:17 UTC
Add a cleanup callback
Tip revision: 48d5c9b
2d.shadow.enable.y.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.shadow.enable.y</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.shadow.enable.y</h1>
<p class="desc">Shadows are drawn if shadowOffsetY is set</p>


<script>
var t = async_test("Shadows are drawn if shadowOffsetY is set");
t.step(function() {

var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');

ctx.globalCompositeOperation = 'destination-atop';
ctx.shadowColor = '#0f0';
ctx.shadowOffsetY = 0.1;
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

t.done();

});
</script>
back to top