blob: 2ea618bed028651c94df64560f518c3fa84cc7bf [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 width="320" height="240" playsinline id="video" aria-label="Video label1"></video>
<video width="320" height="240" controls id="video2" aria-label="Video label2">
<source src="../../media/content/counting.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the video elements on iOS.");
if (window.accessibilityController) {
jsTestIsAsync = true;
var vid = document.getElementById("video");
var video = accessibilityController.accessibleElementById("video");
shouldBeFalse("video.isIgnored");
var video2 = accessibilityController.accessibleElementById("video2");
shouldBeFalse("video2.isIgnored");
vid.oncanplaythrough = function() {
shouldBe("video.description", "'AXLabel: Video label1, 9 seconds'");
shouldBe("video.stringValue", "'AXValue: 0 seconds'");
// Test play and pause.
shouldBeTrue("vid.paused");
video.press();
shouldBeFalse("vid.paused");
video.press();
shouldBeTrue("vid.paused");
// Test fast forward and rewind.
video.increment();
video.increment();
shouldBe("video.stringValue", "'AXValue: 2 seconds'");
video.decrement();
shouldBe("video.stringValue", "'AXValue: 1 seconds'");
finishJSTest();
};
vid.src = "../../media/content/counting.mp4";
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>