| Index: LayoutTests/accessibility/menu-list-popup-reuses-objects.html
|
| diff --git a/LayoutTests/accessibility/menu-list-selection-changed.html b/LayoutTests/accessibility/menu-list-popup-reuses-objects.html
|
| similarity index 57%
|
| copy from LayoutTests/accessibility/menu-list-selection-changed.html
|
| copy to LayoutTests/accessibility/menu-list-popup-reuses-objects.html
|
| index b584cee986add87c1fd8f770efde04ecca03db98..4c0d31e87594d41511a83d934e9f76e7b57640c1 100644
|
| --- a/LayoutTests/accessibility/menu-list-selection-changed.html
|
| +++ b/LayoutTests/accessibility/menu-list-popup-reuses-objects.html
|
| @@ -20,20 +20,29 @@ if (window.testRunner && window.accessibilityController) {
|
| var menulist = document.getElementById("menulist");
|
| menulist.selectedIndex = 0;
|
|
|
| + var axMenuList = accessibilityController.accessibleElementById("menulist");
|
| + var axMenuListPopup = axMenuList.childAtIndex(0);
|
| + shouldBe("axMenuListPopup.role", "\"AXRole: AXMenuListPopup\"");
|
| + var axMenuListOption = axMenuListPopup.childAtIndex(0);
|
| + shouldBe("axMenuListOption.role", "\"AXRole: AXMenuListOption\"");
|
| +
|
| + window.setTimeout(function() {
|
| +
|
| // Explore the whole accessibility tree. State change events won't fire on accessible objects that haven't
|
| // been created yet.
|
| accessibilityController.accessibleElementById('foo');
|
|
|
| - var result = "";
|
| accessibilityController.addNotificationListener(function(element, notification) {
|
| - if (element.role == "AXRole: AXMenuListOption") {
|
| - debug("Got notification on option " + element.stringValue + " isSelected=" + element.isSelected);
|
| - if (element.isSelected)
|
| - finishJSTest();
|
| + if (element.stringValue == axMenuListOption.stringValue) {
|
| + window.element = element;
|
| + shouldBe("element.isEqual(axMenuListOption)", "true");
|
| + shouldBe("element.parentElement().isEqual(axMenuListPopup)", "true");
|
| + finishJSTest();
|
| }
|
| });
|
|
|
| - menulist.selectedIndex = 2;
|
| + menulist.selectedIndex = 1;
|
| + }, 0);
|
| }
|
|
|
| </script>
|
|
|