WebKit does not expose AXPlaceholder value on password fields
[WebKit-https.git] / LayoutTests / accessibility / placeholder.html
1 <html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
5 <script>
6 var successfullyParsed = false;
7 </script>
8 <script src="../fast/js/resources/js-test-pre.js"></script>
9 </head>
10 <body id="body">
11  
12     <input placeholder="search" type="text" name="q" size="15" maxlength="255" id="searchterm" />
13
14     <input id="password" class="field" type="password" name="sc1798" value="" placeholder="Password" spellcheck="true" maxlength="5096">
15     
16     <p id="description"></p>
17     <div id="console"></div>
18      
19     <script>
20         if (window.accessibilityController) {
21             description("This test makes sure that the placeholder is returned as the correct attribute");
22
23             var field = document.getElementById("searchterm").focus();
24             var fieldElement = accessibilityController.focusedElement;
25             shouldBe("fieldElement.stringAttributeValue('AXPlaceholderValue')", "'search'");
26
27             document.getElementById("password").focus();
28             var pass = accessibilityController.focusedElement;
29             shouldBe("pass.stringAttributeValue('AXPlaceholderValue')", "'Password'");
30
31         }
32         successfullyParsed = true;
33     </script>
34
35 <script src="../fast/js/resources/js-test-post.js"></script>
36 </body>
37 </html>