chromium/third_party/blink/web_tests/http/tests/resources/pointer-lock/iframe-allows-inner-iframe.html

<!DOCTYPE HTML>
<html>
<head>
<script src="iframe-common.js"></script>
</head>
<script>
    function onInnerFrameLoad() {
        parent.postMessage('inner frame load', '*');
    }
    window.addEventListener('message', (event) => {
        if (event.data[0] == "clickBody") {
            document.getElementById("nested-child").contentWindow.postMessage(event.data, "*");
        } else {
            parent.postMessage(event.data, '*');
        }
    });
</script>
<body>
    <iframe id="nested-child" src="inner-iframe.html" sandbox="allow-pointer-lock allow-scripts" onload="onInnerFrameLoad()"></iframe>
    iframe-allows-inner-iframe.html
</body>
</html>