JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / accessibility / aria-readonly.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7 <div role="textbox" aria-readonly="false" aria-multiline="false" id="ariaTextBox" tabindex="0"></div>
8 <div role="textbox" aria-readonly="true" id="ariaReadOnlyAriaTextBox" tabindex="0"></div>
9 <input type="text" aria-readonly="true" id="ariaReadOnlyTextField" size=20>
10 <input type="text" aria-readonly="false" id="ariaNonReadOnlyTextField" size=20>
11 <input type="text" readonly="readonly" id="htmlReadOnlyTextField" size=20>
12 <input type="text" id="textField" size=20>
13 <textarea rows="2" cols="20" readonly="readonly" id="htmlReadOnlyTextArea"></textarea>
14 <textarea rows="2" cols="20" id="textArea"></textarea>
15 <p id="description"></p>
16 <div id="console"></div>
17
18 <script>
19
20     description("This tests that the AXValue property is correctly reported for native and non-native text boxes.");
21
22     if (window.accessibilityController) {
23           document.getElementById("ariaTextBox").focus();
24           var ariaTextBox = accessibilityController.focusedElement;
25           var ariaTextBoxIsWritable = ariaTextBox.isAttributeSettable("AXValue");
26           shouldBe("ariaTextBoxIsWritable", "true");
27
28           document.getElementById("ariaReadOnlyAriaTextBox").focus();
29           var ariaReadOnlyAriaTextBox = accessibilityController.focusedElement;
30           var ariaReadOnlyAriaTextBoxIsWritable = ariaReadOnlyAriaTextBox.isAttributeSettable("AXValue");
31           shouldBe("ariaReadOnlyAriaTextBoxIsWritable", "false");
32
33           document.getElementById("ariaReadOnlyTextField").focus();
34           var ariaReadOnlyTextField = accessibilityController.focusedElement;
35           var ariaReadOnlyTextFieldIsWritable = ariaReadOnlyTextField.isAttributeSettable("AXValue");
36           shouldBe("ariaReadOnlyTextFieldIsWritable", "false");
37
38           document.getElementById("ariaNonReadOnlyTextField").focus();
39           var ariaNonReadOnlyTextField = accessibilityController.focusedElement;
40           var ariaNonReadOnlyTextFieldIsWritable = ariaNonReadOnlyTextField.isAttributeSettable("AXValue");
41           shouldBe("ariaNonReadOnlyTextFieldIsWritable", "true");
42
43           document.getElementById("htmlReadOnlyTextField").focus();
44           var htmlReadOnlyTextField = accessibilityController.focusedElement;
45           var htmlReadOnlyTextFieldIsWritable = htmlReadOnlyTextField.isAttributeSettable("AXValue");
46           shouldBe("htmlReadOnlyTextFieldIsWritable", "false");
47
48           document.getElementById("textField").focus();
49           var textField = accessibilityController.focusedElement;
50           var textFieldIsWritable = textField.isAttributeSettable("AXValue");
51           shouldBe("textFieldIsWritable", "true");
52
53           document.getElementById("htmlReadOnlyTextArea").focus();
54           var htmlReadOnlyTextArea = accessibilityController.focusedElement;
55           var htmlReadOnlyTextAreaIsWritable = htmlReadOnlyTextArea.isAttributeSettable("AXValue");
56           shouldBe("htmlReadOnlyTextAreaIsWritable", "false");
57
58           document.getElementById("textArea").focus();
59           var textArea = accessibilityController.focusedElement;
60           var textAreaIsWritable = textArea.isAttributeSettable("AXValue");
61           shouldBe("textAreaIsWritable", "true");
62     }
63
64 </script>
65
66 <script src="../fast/js/resources/js-test-post.js"></script>
67 </body>
68 </html>