https://github.com/web-platform-tests/wpt
Raw File
Tip revision: ada36ad22e53c231d18145935b158ba4dc58c561 authored by Zhuoyu Qian on 29 March 2018, 01:09:38 UTC
Check BackgroundEdgeOrigin when check BackgroundPosition.
Tip revision: ada36ad
2d.strokeRect.shadow.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.strokeRect.shadow</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.strokeRect.shadow</h1>
<p class="desc">strokeRect draws shadows</p>


<script>
var t = async_test("strokeRect draws shadows");
t.step(function() {

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

ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#f00';
ctx.shadowColor = '#0f0';
ctx.shadowBlur = 0;
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 50;
ctx.strokeStyle = '#f00';
ctx.lineWidth = 50;
ctx.strokeRect(0, -75, 100, 50);
_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

t.done();

});
</script>
back to top