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

Unified Diff: LayoutTests/media/media-controller-effective-playback-rate.html

Issue 336303002: Fix HTMLMediaElement to always use the 'effective playback rate' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and address CR comments. Created 6 years, 6 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/media-controller-effective-playback-rate-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/media-controller-effective-playback-rate.html
diff --git a/LayoutTests/media/media-controller-effective-playback-rate.html b/LayoutTests/media/media-controller-effective-playback-rate.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0d28631db9727e37d01066e75ea2a994524a62c
--- /dev/null
+++ b/LayoutTests/media/media-controller-effective-playback-rate.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test effective playback rate with a MediaController.</title>
+ <script src="media-file.js"></script>
+ <script src="video-test.js"></script>
+ <script>
+ var start = function()
+ {
+ findMediaElement();
+ video.src = findMediaFile("video", "content/test");
+
+ // Set the rate on the media element so playback won't move forward.
+ video.playbackRate = 0;
+
+ waitForEvent("canplay",canplay);
+ };
+
+ var canplay = function()
+ {
+ video.controller = new MediaController();
+
+ // Verify the controller playback rate is 1. This
+ // means the "effective playback rate" is 1 even though
+ // the HTMLMediaElement's playbackRate attribute is 0.
+ testExpected("video.controller.playbackRate", 1);
+ testExpected("video.playbackRate", 0);
+
+ // Initiate playback and verify that time moves forward.
+ run("video.play()");
+ waitForEventOnce("play", play);
+ };
+
+ var play = function()
+ {
+ waitForEventOnce("timeupdate", timeupdate);
+ };
+
+ var timeupdate = function() {
+ testExpected("video.currentTime", 0, "!=");
+ endTest();
+ };
+ </script>
+ </head>
+ <body onload="start()">
+ <video></video>
+ </body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/media/media-controller-effective-playback-rate-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698