blob: d7f7aa6ab64e90bfa0106db2e36f557ecdf864e4 [file] [edit]
<!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>
<button id="button">
<span id="counter">0<span>
</button>
<script>
if (window.accessibilityController) {
window.jsTestIsAsync = true;
let output = "Tests that the title of the button is properly updated when the text of its descendant changes.\n";
var button = accessibilityController.accessibleElementById("button");
output += expect("button.title", "'AXTitle: 0'");
document.getElementById("counter").innerText = "3";
setTimeout(async () => {
await waitFor(() => { return button.title == "AXTitle: 3"; });
output += expect("button.title", "'AXTitle: 3'");
debug(output);
finishJSTest();
}, 0);
}
</script>
</body>
</html>