| <script src="../../resources/js-test.js"></script> |
| <div>This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.</div> |
| <div role="textbox" id="ariaTextBox" aria-multiline="false" tabindex="0">Some text in a textbox.</div> |
| if (window.testRunner && window.accessibilityController) { |
| accessibilityController.logAccessibilityEvents(); |
| var ariaTextBox = document.getElementById("ariaTextBox"); |
| textboxAxElement = accessibilityController.focusedElement; |
| textboxAxElement.addNotificationListener(logNotification); |
| pendingNotifications = 3; |
| ariaTextBox.firstChild.deleteData(0, 5); |
| ariaTextBox.textContent = "changed textContent"; |
| ariaTextBox.innerText = "changed innerText"; |
| function logNotification(notification) { |
| if (notification == "AXValueChanged") { |
| debug("Successfully received AXValueChanged."); |
| if (pendingNotifications == 0) { |
| textboxAxElement.removeNotificationListener(); |