chromium/third_party/blink/web_tests/paint/invalidation/svg/feImage-target-reappend-to-document.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintAndPixelTest()">
    <script xlink:href="../../../resources/run-after-layout-and-paint.js"></script>
    <script xlink:href="../resources/text-based-repaint.js"></script>
    <title>There should be a single green 100x100 square.</title>
    <defs>
        <rect id="red-rect" width="100" height="100" fill="red"/>
        <rect id="green-rect" width="100" height="100" fill="green"/>

        <filter id="filter">
            <feImage id="feimage-green" xlink:href="#green-rect"/>
            <feImage id="feimage-red" xlink:href="#red-rect"/>
        </filter>
    </defs>
    <rect x="0" y="0" width="100" height="100" filter="url(#filter)" />
    <script>
    <![CDATA[
        window.testIsAsync = true;
        function repaintTest() {
            // Move feimage-green after feimage-red
            var greenImage = document.getElementById("feimage-green");
            document.getElementById("filter").removeChild(greenImage);

            runAfterLayoutAndPaint(function() {
                document.getElementById("filter").appendChild(greenImage);
                finishRepaintTest();
            });
        }
    ]]>
    </script>
</svg>