| <script src="../../resources/js-test-pre.js"></script> |
| <div id="textbox1" role="textbox" aria-readonly="false" tabindex="0"></div> |
| <div id="textbox2" role="textbox" aria-readonly="true" tabindex="0"></div> |
| window.jsTestIsAsync = true; |
| description("This tests that changing the aria-readonly value results in a state-changed notification."); |
| if (window.testRunner && window.accessibilityController) { |
| accessibilityController.addNotificationListener(function(element, notification, state) { |
| if (notification != "AXReadOnlyStatusChanged") |
| debug(notification + " " + (state == "1") + " on " + element.stringAttributeValue("html-id")); |
| var element = document.getElementById("textbox1"); |
| debug("Setting aria-readonly to true on textbox1."); |
| element.setAttribute("aria-readonly", "true"); |
| element = document.getElementById("textbox2"); |
| debug("Setting aria-readonly to false on textbox2."); |
| element.setAttribute("aria-readonly", "false"); |
| window.setTimeout(function() { |
| accessibilityController.removeNotificationListener(); |
| <script src="../../resources/js-test-post.js"></script> |