| Index: third_party/WebKit/LayoutTests/media/controls/controls-video-keynav-no-controls.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/controls/controls-video-keynav-no-controls.html b/third_party/WebKit/LayoutTests/media/controls/controls-video-keynav-no-controls.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2f6810067f655932e6a1949533fec00468422a74
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/media/controls/controls-video-keynav-no-controls.html
|
| @@ -0,0 +1,51 @@
|
| +<DOCTYPE html>
|
| +<title>Test media controls video keyboard navigation</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../media-file.js"></script>
|
| +<script src="../media-controls.js"></script>
|
| +<video></video>
|
| +<script>
|
| +test(_ => {
|
| + assert_true('eventSender' in window);
|
| +}, 'eventSender required');
|
| +
|
| +async_test(function(t) {
|
| + var video = document.querySelector("video");
|
| + video.src = findMediaFile("video", "../content/test");
|
| + assert_equals(video.volume, 1);
|
| + assert_equals(video.currentTime, 0);
|
| +
|
| + video.oncanplaythrough = t.step_func_done(function() {
|
| + // Focus the video.
|
| + video.focus();
|
| +
|
| + // 'Enter' does not play the video.
|
| + eventSender.keyDown("Enter");
|
| + assert_true(video.paused);
|
| +
|
| + // 'Down' does not reduces volume.
|
| + eventSender.keyDown("ArrowDown");
|
| + assert_equals(video.volume, 0);
|
| +
|
| + // 'Up' does not increases volume.
|
| + eventSender.keyDown("ArrowUp");
|
| + assert_equals(video.volume, 0);
|
| +
|
| + // 'Space' also does not pauses/plays the video.
|
| + eventSender.keyDown(" ");
|
| + assert_true(video.paused);
|
| +
|
| + var cur = video.currentTime;
|
| +
|
| + // 'Right' does not scrub the timeline forward.
|
| + eventSender.keyDown("ArrowRight");
|
| + assert_equals(video.currentTime, cur);
|
| +
|
| + // 'End' does not set the timeline to end.
|
| + eventSender.keyDown("End");
|
| + assert_equals(video.currentTime, cur);
|
| + });
|
| +});
|
| +</script>
|
| +
|
|
|