| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| </head> |
| <body id="body"> |
| |
| <div role="textbox" tabindex=0 id="textbox" contenteditable=true> |
| content inside |
| </div> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that ARIA removing an element from a live region sends the correct notification."); |
| |
| var axTextbox = 0; |
| function notificationCallback(notification) { |
| if (notification == "AXValueChanged") { |
| alert("Successfully received " + notification); |
| axTextbox.removeNotificationListener(); |
| window.layoutTestController.notifyDone(); |
| } |
| else if (notification == "AXSelectedTextChanged") { |
| alert("Successfully received " + notification); |
| } |
| } |
| |
| if (window.accessibilityController) { |
| window.layoutTestController.waitUntilDone(); |
| |
| textbox = document.getElementById("textbox"); |
| textbox.focus(); |
| |
| var axTextbox = accessibilityController.focusedElement; |
| |
| // Trigger selection changes. |
| var s = window.getSelection(); |
| s.setPosition(textbox, 0); |
| for (var k = 0; k < 3; k++) { |
| s.modify("move", "forward", "character"); |
| } |
| |
| // Trigger value change. |
| document.execCommand("InsertText", false, "hello "); |
| |
| var addedNotification = axTextbox.addNotificationListener(notificationCallback); |
| shouldBe("addedNotification", "true"); |
| } |
| |
| </script> |
| |
| <script src="../../../fast/js/resources/js-test-post.js"></script> |
| </body> |
| </html> |