3 <script src="../fast/js/resources/js-test-pre.js"></script>
6 testRunner.waitUntilDone();
9 description("This tests that changing the value of a menu list sends a notification even when it's not popped open.");
11 var menulist = document.getElementById("menulist");
13 var accessibleMenulist = accessibilityController.focusedElement;
15 function listener(notification) {
16 document.getElementById("console").innerText += "Got notification: " + notification + "\n";
17 accessibleMenulist.removeNotificationListener(listener);
18 debug('<br /><span class="pass">TEST COMPLETE</span>');
19 if (window.testRunner)
20 testRunner.notifyDone();
22 accessibleMenulist.addNotificationListener(listener);
24 // Change the selected index.
25 menulist.selectedIndex = 1;
27 // Make the test finish quickly whether we get the notification or not.
28 window.setTimeout(function() {
29 if (window.testRunner)
30 testRunner.notifyDone();
34 if (window.testRunner && window.accessibilityController) {
35 window.addEventListener('load', function() {
36 setTimeout(runTest, 10);
43 <select id="menulist">
44 <option selected>One</option>
46 <option>Three</option>
49 <p id="description"></p>
50 <div id="console"></div>