summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/canvas/element/manual/filters/canvas-filter-shadow.html
blob: ddc6c89ee554148a485983745034cb7195e5cd37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<link rel="match" href="canvas-filter-shadow-expected.html"/>
<body>
  <canvas id="canvas" width="300" height="300"></canvas>
</body>
<script>
  /*
  The expected behavior of filter-generated shadows is tested against
  a drawing using only rectangles that draws the shadows manually.
  */
  var canvas = document.getElementById('canvas');
  var ctx = canvas.getContext('2d');
  ctx.filter = 'drop-shadow(10px 10px 0 red)';
  ctx.fillRect(10, 10, 50, 50);
</script>