<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true AsyncFrameScrollingEnabled=true ] -->
<html>
<head>
    <title>Slow-scrolling reasons should not escape the iframe boundary</title>
    <style>
        body {
            height: 2000px;
        }
        iframe {
            width: 500px;
            height: 400px;
            border: 1px solid black;
        }
    </style>
    <script src="../../../resources/ui-helper.js"></script>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();            
        }

        window.addEventListener('load', async () => {
            if (!window.internals)
                return

            document.getElementById('scrollingTree').innerText = await UIHelper.getScrollingTree();
            if (window.testRunner)
                testRunner.notifyDone();
        }, false);
    </script>
</head>
<body>
    <iframe srcdoc="
        <style>
        .scroller {
            background-color: silver;
            border: 1px solid black;
            padding: 10px;
            width: 400px;
            height: 300px;
            overflow: scroll;
        }
        
        .scrolling-content {
            height: 1000px;
        }
        
        .fixed-background {
            margin-top: 100px;
            width: 400px;
            height: 300px;
            background-image: linear-gradient(green, blue);
            background-attachment: fixed;
        }
        </style>
        <div class=scroller>
            <div class=scrolling-content>
                Scrolling content
                <div class=fixed-background>
                    Fixed background
                </div>
            </div>
        </div>
    "></iframe>
    <pre id="scrollingTree"></pre>
</body>
</html>
