Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / password-delete-contents.html
blob3e4461bd458b0bdc177927fb08d23bf21da592a3
1 <!DOCTYPE>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description">This makes sure we are able to delete the contents of a password field: deleting a selection and evaluating the field contents.</p>
8 <div id="console"></div>
9 <input type="password" id="passwordField">
10 <script>
12 if (!window.testRunner || !window.internals)
13 testFailed('This test requires access to window.internals');
15 var textField;
16 var desiredString = "hello";
17 function runTest(element) {
18 textField = element;
20 textField.value = "helllo";
21 textField.focus();
23 shouldBe("passwordField.value='helllo'; passwordField.setSelectionRange(3, 4); testRunner.execCommand('Delete', false, null); passwordField.value", "'hello'");
25 textField.parentNode.removeChild(textField);
28 runTest(document.getElementById('passwordField'));
30 </script>
31 </body>
32 </html>