WebCore: AX: TextArea should return AXSelectedTextRange of 0,0 if the cursor is not...
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / selected-text-range-for-empty-textarea.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
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 <textarea id="textarea" tabindex=0></textarea>
13
14 <p id="description"></p>
15 <div id="console"></div>
16
17 <script>
18
19     description("This tests that the AXSelectedTextRange for a text area will be 0, 0 instead of nil.");
20
21     if (window.accessibilityController) {
22
23           // this text field should be required.
24           document.getElementById("textarea").focus();
25           var obj = accessibilityController.focusedElement;
26
27           shouldBe("obj.selectedTextRange", "'{0, 0}'");
28     }
29
30     successfullyParsed = true;
31 </script>
32
33 <script src="../../../fast/js/resources/js-test-post.js"></script>
34 </body>
35 </html>