<html>
    <head>
        <script>
            function test()
            {
                if (window.testRunner)
                    testRunner.waitUntilDone();
                    
                // 1) leave field 1 alone. It should show the placeholder text.
                // 2) focus field 2 and type.  It should show bullets for the password.
                    var password = document.getElementById("pass2");
                    password.focus();
                    document.execCommand("InsertText", false, "test");
                // 3) focus field 3 and type.  Clear the value and blur the field.  It should show the placeholder text.
                    password = document.getElementById("pass3");
                    password.focus();
                    document.execCommand("InsertText", false, "test");
                    password.value = "";
                    password.blur();

                if (window.testRunner)
                    testRunner.notifyDone();
            }
        </script>
    </head>
    <body onload="test()">
        This tests that the text security mode switches correctly when the placeholder appears and disappears.<br>
        Leave field 1 alone. It should show the placeholder text: <input type="password" id="pass1" placeholder="placeholder"><br>
        Focus field 2 and type.  It should show bullets for the password.: <input type="password" id="pass2" placeholder="placeholder"><br>
        Focus field 3 and type.  Clear the value and blur the field.  It should show the placeholder text: <input type="password" id="pass3" placeholder="placeholder"><br>
    </body>
</html>
