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

<!DOCTYPE HTML>
<html>
<head>
<script src="pointer-lock-test-harness.js"></script>
<script src="iframe-common.js"></script>
<script>
    window.addEventListener('message', (e)=> {
        if (e.data[0] === "clickBody") {
            clickOnElement(document.body);
        }
    });

    document.addEventListener('click', () => {
        document.body.requestPointerLock().catch(error => {
            // Do nothing here. The errors returned in the promise are
            // tested in Web Platform Tests. These test are testing that
            // the proper events are fires.
        });
    })
</script>
</head>
<body>
    inner-iframe.html
</body>
</html>