blob: f2e2bd13935383379eab1ece0a68f60217d435e6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<video controls="" autoplay="" name="media" src="../../../media/content/test.wav"></video>
<audio controls="" autoplay="" name="media" src="../../../media/content/test.wav"></audio>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that the media controls panel has the correct name and role");
if (window.accessibilityController) {
document.getElementById("body").focus();
var webArea = accessibilityController.focusedElement;
var mainBlock = webArea.childAtIndex(0);
shouldBe("mainBlock.role", "'AXRole: AXGroup'");
shouldBe("mainBlock.title", "'AXTitle: '");
// Video element.
var element = mainBlock.childAtIndex(0);
shouldBe("element.role", "'AXRole: AXVideo'");
shouldBe("element.title", "'AXTitle: '");
element = element.childAtIndex(0);
shouldBe("element.role", "'AXRole: AXToolbar'");
shouldBe("element.title", "'AXTitle: Video Playback'");
// Audio element.
element = mainBlock.childAtIndex(1);
shouldBe("element.role", "'AXRole: AXAudio'");
shouldBe("element.title", "'AXTitle: '");
element = element.childAtIndex(0);
shouldBe("element.role", "'AXRole: AXToolbar'");
shouldBe("element.title", "'AXTitle: Audio Playback'");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>