chromium/third_party/blink/web_tests/http/tests/security/location-href-clears-username-password.html

<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function()
{
    if (window.testRunner) 
    {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
        testRunner.setPopupBlockingEnabled(false);
    }

    window.addEventListener("message", e => {
        var href = e.data.location;
        if (href.indexOf('_username') === -1 &&
            href.indexOf('_password') === -1) {
            alert('PASS');
        }
        if (window.testRunner)
            testRunner.notifyDone();
    });

    var w = window.open('http://_username:[email protected]:8000/security/resources/post-location-to-opener.html');
}
</script>
</head>
<body>This test passes if it alerts the string "PASS".<br/></body>
</html>