blob: 71ae8c71fbb0bd7cf7cad579772a95ae4dee2cfa [file] [log] [blame]
[email protected]dd8b1c92009-06-27 00:07:111<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
[email protected]efb086342013-11-05 00:56:214<script src="../resources/js-test.js"></script>
[email protected]dd8b1c92009-06-27 00:07:115</head>
6<body id="body">
[email protected]c1e03992011-08-04 06:35:567<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>
[email protected]dd8b1c92009-06-27 00:07:1115<p id="description"></p>
16<div id="console"></div>
17
18<script>
19
[email protected]c1e03992011-08-04 06:35:5620 description("This tests that the AXValue property is correctly reported for native and non-native text boxes.");
[email protected]dd8b1c92009-06-27 00:07:1121
22 if (window.accessibilityController) {
[email protected]c1e03992011-08-04 06:35:5623 document.getElementById("ariaTextBox").focus();
24 var ariaTextBox = accessibilityController.focusedElement;
25 var ariaTextBoxIsWritable = ariaTextBox.isAttributeSettable("AXValue");
26 shouldBe("ariaTextBoxIsWritable", "true");
[email protected]dd8b1c92009-06-27 00:07:1127
[email protected]c1e03992011-08-04 06:35:5628 document.getElementById("ariaReadOnlyAriaTextBox").focus();
29 var ariaReadOnlyAriaTextBox = accessibilityController.focusedElement;
30 var ariaReadOnlyAriaTextBoxIsWritable = ariaReadOnlyAriaTextBox.isAttributeSettable("AXValue");
31 shouldBe("ariaReadOnlyAriaTextBoxIsWritable", "false");
[email protected]dd8b1c92009-06-27 00:07:1132
[email protected]c1e03992011-08-04 06:35:5633 document.getElementById("ariaReadOnlyTextField").focus();
34 var ariaReadOnlyTextField = accessibilityController.focusedElement;
35 var ariaReadOnlyTextFieldIsWritable = ariaReadOnlyTextField.isAttributeSettable("AXValue");
36 shouldBe("ariaReadOnlyTextFieldIsWritable", "false");
[email protected]ee4383472009-09-02 05:03:5637
[email protected]c1e03992011-08-04 06:35:5638 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");
[email protected]dd8b1c92009-06-27 00:07:1162 }
63
[email protected]dd8b1c92009-06-27 00:07:1164</script>
65
[email protected]dd8b1c92009-06-27 00:07:1166</body>
67</html>