wpt / svg / styling / svg-filter-render-same-origin-frame.tentative.https.html

Status: PASS | Duration: 21ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/svg/styling/svg-filter-render-same-origin-frame.tentative.https.html

<!DOCTYPE html>
<html class="reftest-wait">
<head>
<link rel="match" href="svg-filter-render-same-origin-frame-ref.tentative.html">
<style type="text/css">
    iframe {
        border: none;
    }
    .svg-filter {
        filter: url(#svg-filter);
    }
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/svg/styling/support/svg-filter-render-util.js"></script>
<script>
    onload = async () => {
        await waitForRender(takeScreenshot);
    };
</script>
</head>
<body>
    <svg width="0" height="0" display="none">
        <filter id="svg-filter">
            <feGaussianBlur in="SourceGraphic" stdDeviation="5" />
        </filter>
    </svg>
    <div>
        SVG filter security test: this test passes if there is a filter effect on the same-origin frame.
    </div>
    <br />
    <div>
        <iframe class="svg-filter" width="100px" height="100px" src="/svg/styling/support/svg-filter-render-iframe.html"></iframe>
    </div>
</body>
</html>

/svg/styling/svg-filter-render-same-origin-frame-ref.tentative.html

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
    .square {
        width: 20px;
        height: 20px;
        background: black;
    }
    .fake-iframe {
        width: 100px;
        height: 100px;
    }
    .svg-filter {
        filter: url(#svg-filter);
    }
</style>
</head>
<body>
    <svg width="0" height="0" display="none">
        <filter id="svg-filter">
            <feGaussianBlur in="SourceGraphic" stdDeviation="5" />
        </filter>
    </svg>
    <div>
        SVG filter security test: this test passes if there is a filter effect on the same-origin frame.
    </div>
    <br />
    <div>
        <div class="svg-filter fake-iframe">
            <div class="square"></div>
        </div>
    </div>
</body>
</html>