chromium/third_party/blink/web_tests/fast/canvas/canvas-filter-svg-inline.html

<svg style="display: block; width: 0; height: 0">
  <defs>
    <filter id="drop-shadow">
      <feoffset dx="0" dy="10" result="offset" in="SourceAlpha"></feoffset>
      <feflood flood-color="rgba(0,0,0,1)"></feflood>
      <fecomposite in2="offset" operator="in"></fecomposite>
      <femerge>
        <femergenode></femergenode>
        <femergenode in="SourceGraphic"></femergenode>
      </femerge>
    </filter>
  </defs>
</svg>
<canvas id="canvas" width="100" height="100"></canvas>
<script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.filter = 'url(#drop-shadow)';
ctx.fillStyle = '#0f0';
ctx.fillRect(25, 25, 50, 40);
</script>