summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/password-doubleclick-selection.html
blob: 147c63ab2d3a6d1a0800f2b3a3eeb0bd731c9b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
    <script>
    function test() {
        var pass = document.getElementById('tf');
        var res = document.getElementById('res');

        if (window.layoutTestController) {
            layoutTestController.dumpAsText();
            eventSender.mouseMoveTo(45, 25);
            eventSender.mouseDown();
            eventSender.mouseUp();
            eventSender.mouseDown();
            eventSender.mouseUp();
            if (pass.selectionStart == 0 && pass.selectionEnd == 11)
                res.innerHTML = "Test Passed.";
            else
                res.innerHTML = "Test Failed.  SelectionStart index = " + pass.selectionStart + ".  SelectionEnd index = " + pass.selectionEnd + ".";
        }
    }
    </script>
</head>
<body onload="test()">
    <input type="password" value="123 456 789" id="tf"></input>
    This tests that double clicking in a password field will not expose word boundaries.<br>
    <br><div id="res"></div>
</body>
</html>