| <!DOCTYPE HTML PUBLIC> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.<br> |
| <div role="textbox" id="ariaTextBox" aria-multiline="false" tabindex="0">Some text in a textbox.</div> |
| <div id="console"></div> |
| <div id="notifications"></div> |
| <script> |
| var textboxAxElement; |
| if (window.testRunner && window.accessibilityController) { |
| window.testRunner.waitUntilDone(); |
| |
| accessibilityController.logAccessibilityEvents(); |
| window.testRunner.dumpAsText(); |
| |
| var ariaTextBox = document.getElementById("ariaTextBox"); |
| ariaTextBox.focus(); |
| 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") { |
| document.getElementById("notifications").innerHTML += "Successfully received AXValueChanged.<br>"; |
| pendingNotifications--; |
| if (pendingNotifications == 0) { |
| textboxAxElement.removeNotificationListener(); |
| window.testRunner.notifyDone(); |
| } |
| } |
| } |
| |
| </script> |
| |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |