| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ IsAccessibilityIsolatedTreeEnabled=true ] --> |
| <html> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| <script src="../../resources/accessibility-helper.js"></script> |
| </head> |
| <body> |
| |
| <a id="link" aria-expanded="true" href="#">This is an expanded link.</a> |
| |
| <script> |
| var output = "This tests that aria-expanded works as expected on links.\n\n"; |
| |
| var link; |
| if (window.accessibilityController) { |
| window.jsTestIsAsync = true; |
| link = accessibilityController.accessibleElementById('link'); |
| output += expect("link.isAttributeSupported('AXExpanded')", "true"); |
| output += expect("link.isExpanded", "true"); |
| |
| output += "Changing link expanded status to FALSE\n"; |
| document.getElementById("link").setAttribute("aria-expanded", "false"); |
| setTimeout(async () => { |
| await waitFor(() => link.isExpanded == false); |
| output += expect("link.isExpanded", "false"); |
| |
| debug(output); |
| finishJSTest(); |
| }, 0); |
| } |
| </script> |
| |
| </body> |
| </html> |