Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / selection-change-notification-textarea.html
blob95a84b696aa5d373d0e85690a824a9de26134957
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body id="static_eventTarget">
8 <textarea id="textarea">textarea</textarea>
10 <div id="console"></div>
11 <script>
12 description("Tests that a 'selected text changed' notification fires on an textarea element when the user moves the cursor.");
13 window.jsTestIsAsync = true;
15 function runTest() {
16 // This forces building the accessibility tree, because selection change
17 // events only fire on elements that already exist.
18 accessibilityController.accessibleElementById('dummy');
20 var element = document.getElementById('textarea');
21 var axElement = accessibilityController.accessibleElementById('textarea');
22 element.focus();
24 axElement.addNotificationListener(function(notification) {
25 if (notification == 'SelectedTextChanged') {
26 debug('Got SelectedTextChanged notification on textarea element.');
27 axElement.removeNotificationListener();
28 finishJSTest();
30 });
32 element.setSelectionRange(0, 1);
35 if (window.testRunner && window.accessibilityController) {
36 testRunner.dumpAsText();
37 window.onload = runTest();
40 </script>
42 </body>
43 </html>