chromium/third_party/blink/web_tests/svg/foreignObject/filter-repaint.svg

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:xhtml="http://www.w3.org/1999/xhtml" onload="runTest()">

  <!-- Test for http://crbug.com/165180 -->
  <defs>
    <filter id="f">
      <feOffset/>
    </filter>
  </defs>

  <rect id="r" width="100%" height="100%" fill="yellow"/>
  <g filter="url(#f)">
    <foreignObject width="100%" height="100%">
      <xhtml:div id="div" style="width: 99px; height: 100px; background-color: red;"></xhtml:div>
    </foreignObject>
  </g>

  <script>
    function runTest() {
        if (window.testRunner) {
          testRunner.waitUntilDone();
        }

        window.requestAnimationFrame(function() {
            setTimeout(function() {
                document.getElementById('div').style.backgroundColor = 'green';
                document.getElementById('div').style.width = '100px';

                // Force a full redraw to get rid of the display() shade and make ref-testing feasible.
                document.getElementById('r').setAttribute('fill', 'none');

                if (window.testRunner)
                  testRunner.notifyDone();
            }, 0);
        });
    }
  </script>
</svg>