chromium/third_party/blink/web_tests/fast/frames/resources/sandboxed-iframe-navigation-targetlink.html

<html>
<head>
<script>

/*
 * Set the target of the link to 'X_target', where X is the name of
 * this frame.
 *
 * Then click the link.
 */

function click_link()
{
    var event = document.createEvent('MouseEvent');
    event.initEvent('click', true, true);
    var link = document.getElementById('link');
    link.target = self.name + '_target';
    link.dispatchEvent(event);
}

</script>
</head>

<body onload='click_link();'>

    <a href="sandboxed-iframe-navigated.html" id="link">
        (link triggered by script)
    </a>

</body>
</html>