https://github.com/web-platform-tests/wpt
Raw File
Tip revision: f6f3c2a859b19ec6e7f273ed7a18bfdfb537a897 authored by David Quiroz Marin on 06 September 2018, 14:38:08 UTC
Remove ExtendedTextMetrics flag to launch canvas TextMetrics.
Tip revision: f6f3c2a
2d.clearRect.shadow.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.clearRect.shadow</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.clearRect.shadow</h1>
<p class="desc">clearRect does not draw shadows</p>


<script>
var t = async_test("clearRect does not draw shadows");
t.step(function() {

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

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

t.done();

});
</script>
back to top