| <script src="../resources/js-test.js"></script> |
| description("This tests that changing the value of a menu list sends a notification even when it's not popped open."); |
| var menulist = document.getElementById("menulist"); |
| var accessibleMenulist = accessibilityController.focusedElement; |
| function listener(notification) { |
| document.getElementById("console").innerText += "Got notification: " + notification + "\n"; |
| accessibleMenulist.removeNotificationListener(listener); |
| accessibleMenulist.addNotificationListener(listener); |
| // Change the selected index. |
| menulist.selectedIndex = 1; |
| // Make the test finish quickly whether we get the notification or not. |
| window.setTimeout(function() { |
| if (window.testRunner && window.accessibilityController) { |
| window.addEventListener('load', function() { |
| <option selected>One</option> |