chromium/third_party/blink/web_tests/external/wpt/focus/support/focus-restoration-in-same-site-iframes-inner-window.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Inner document</title>
</head>
<body>
<h1>Inner</h1>
<script>
window.onmessage = function(e) {
    if (e.data == "getlog") {
        parent.postMessage(log, "*");
    }
};

let log = "log:";
window.onfocus = function() {
    log += "windowfocus,"
}
window.onblur = function() {
    log += "windowblur,"
}
window.onload = function() {
    log += "willfocuswindow,"
    window.focus();
    log += "didfocuswindow,"
    parent.postMessage("start", "*");
}
</script>
</body>
</html>