Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: LayoutTests/media/controls-volume-slider-keynav.html

Issue 294963003: MediaVolumeSliderPart is not vertical (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added TC. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/media/controls-volume-slider-keynav-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/controls-volume-slider-keynav.html
diff --git a/LayoutTests/media/controls-volume-slider-keynav.html b/LayoutTests/media/controls-volume-slider-keynav.html
new file mode 100644
index 0000000000000000000000000000000000000000..f267efe0be4446b321f2490ab1bd46167574ebdd
--- /dev/null
+++ b/LayoutTests/media/controls-volume-slider-keynav.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html>
+ <head>
+ <title>media controls volume slider keyboard navigation</title>
+ <script src="media-file.js"></script>
+ <script src="media-controls.js"></script>
+ <script src="video-test.js"></script>
+ </head>
+ <body>
+ <audio controls></audio>
+ <script>
+ findMediaElement();
+ audio.src = findMediaFile("audio", "content/test");
+ testExpected("audio.volume", 1);
+ waitForEvent("loadedmetadata", function()
+ {
+ // Focus the volume slider.
+ var button = mediaControlsButton(audio, "volume-slider");
+ button.focus();
+
+ // 'Left' reduces volume.
+ eventSender.keyDown('leftArrow');
+ testExpected("audio.volume", 1, '<');
+
+ // 'Right' reduces volume (same step as 'Left', but opposite sign).
+ eventSender.keyDown('rightArrow');
+ testExpected("audio.volume", 1);
+
+ // 'Home' sets minimum volume (0).
+ eventSender.keyDown('home');
+ testExpected("audio.volume", 0);
+
+ // 'End' sets maximum volume (1).
+ eventSender.keyDown('end');
+ testExpected("audio.volume", 1);
+
+ waitForEventAndEnd("volumechange");
+ });
+ </script>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/media/controls-volume-slider-keynav-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698