2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
4 <select id=
"listbox" size=
"3">
5 <option id=
"item0">Alicia
</option>
6 <option id=
"item1">Peter
</option>
7 <option id=
"item2">Kalinda
</option>
10 async_test(function(t
)
12 var listbox
= document
.getElementById("listbox");
13 listbox
.selectedIndex
= 0;
16 accessibilityController
.accessibleElementById('dummy');
18 var gotCheckedStateChanged
= false;
19 var gotSelectedChildrenChanged
= false;
22 window
.setTimeout(function() {
24 accessibilityController
.addNotificationListener(t
.step_func(function listener(element
, notification
) {
25 if (notification
== "CheckedStateChanged") {
26 assert_equals(element
.role
, "AXRole: AXListBoxOption");
27 gotCheckedStateChanged
= true;
29 if (notification
== "SelectedChildrenChanged") {
30 assert_equals(element
.role
, "AXRole: AXListBox");
31 gotSelectedChildrenChanged
= true;
33 if (notification
== "Focus") {
34 assert_equals(element
.role
, "AXRole: AXListBoxOption");
37 if (gotCheckedStateChanged
&& gotSelectedChildrenChanged
&& gotFocus
) {
42 listbox
.selectedIndex
= 1;
44 }, "menu list fires focus event on close");