blob: 71506f5755804001519a068974ebf6f3deeec4c1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script src="../resources/accessibility-helper.js"></script>
</head>
<body id="body">
<img alt="TEST1" src="resources/cake.png" role="text" id="text">
<img alt="TEST2" src="resources/cake.png" role="group" id="group">
<img alt="TEST3" src="resources/cake.png" role="button" id="button">
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the alternative text calculation when setting a role on an img with an alt attribute.");
if (window.accessibilityController) {
var text = accessibilityController.accessibleElementById("text");
shouldBe("text.stringValue", "'AXValue: TEST1'");
var group = accessibilityController.accessibleElementById("group");
var button = accessibilityController.accessibleElementById("button");
shouldBeEqualToString("platformValueForW3CName(group)", "TEST2");
shouldBeEqualToString("platformValueForW3CName(button)", "TEST3");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>