chromium/third_party/blink/web_tests/fast/forms/input-type-change-in-onfocus-mouse.html

<html>
<head>
    <script>
    function runTest() {
        if (window.testRunner)
            testRunner.dumpAsText();
        else {
            alert('This test does not work in Safari.');
            return;
        }
            
        onblurCalled = false;

        // Simulate a mouse click.
        eventSender.mouseMoveTo(15, 15);
        eventSender.mouseDown();
        eventSender.mouseUp();
        
        if (onblurCalled) 
            return;

        document.getElementById('result').innerHTML = 'SUCCESS';        
    }
    </script>
</head>
<body onload="runTest()">
    <input id="input" type="text" onfocus="this.setAttribute('type', 'password')" onblur="onblurCalled = true;">
    <p>
    This tests that changing an input element's type in its onfocus handler does not cause its onblur handler to be called. If this test is successful, "SUCCESS" should be shown below.
    </p>
    <div id="result">FAILURE</div>
</body>
</html>