JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / textbox-role-reports-notifications.html
1 <!DOCTYPE HTML PUBLIC>
2 <html>
3 <head>
4 <script src="../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 This tests that the AXValueChanged notification is correctly reported for non-native text boxes when content is changed.<br>
8 <div role="textbox" id="ariaTextBox" aria-multiline="false" tabindex="0">Some text in a textbox.</div>
9 <div id="console"></div>
10 <script>
11     if (window.layoutTestController && window.accessibilityController) {
12         window.layoutTestController.waitUntilDone();
13
14         accessibilityController.logAccessibilityEvents();
15         window.layoutTestController.dumpAsText();
16
17         var ariaTextBox = document.getElementById("ariaTextBox");
18         ariaTextBox.focus();
19         var textboxAxElement = accessibilityController.focusedElement;
20         textboxAxElement.addNotificationListener(logNotification);
21         pendingNotifications = 3;
22         ariaTextBox.firstChild.deleteData(0, 5);
23         ariaTextBox.textContent = "changed textContent";
24         ariaTextBox.innerText = "changed innerText";
25     }
26
27     function logNotification(notification) {
28         if (notification == "AXValueChanged") {
29             alert("Successfully received AXValueChanged.");
30             pendingNotifications--;
31             if (pendingNotifications == 0) {
32                 textboxAxElement.removeNotificationListener();
33                 window.layoutTestController.notifyDone();
34             }
35         }
36     }
37
38 </script>
39
40 <script src="../fast/js/resources/js-test-post.js"></script>
41 </body>
42 </html>