| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| </head> |
| <body id="static_eventTarget"> |
| |
| <p id="p">One paragraph in the document</p> |
| |
| <div id="console"></div> |
| <script> |
| async_test((t) => { |
| var axElement = accessibilityController.rootElement; |
| axElement.addNotificationListener(t.step_func(function(notification) { |
| if (notification == 'SelectedTextChanged') { |
| axElement.removeNotificationListener(); |
| t.done(); |
| } |
| })); |
| |
| var p = document.getElementById('p'); |
| var range = document.createRange(); |
| range.setStart(p.firstChild, 0); |
| range.setEnd(p.firstChild, 1); |
| window.getSelection().removeAllRanges(); |
| window.getSelection().addRange(range); |
| }, "Tests that a 'selected text changed' notification fires on a contentEditable element when the user moves the cursor within it."); |
| |
| </script> |
| |
| </body> |
| </html> |