Index: LayoutTests/media/controls-cast-do-not-fade-out.html |
diff --git a/LayoutTests/media/controls-cast-do-not-fade-out.html b/LayoutTests/media/controls-cast-do-not-fade-out.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7c799f8f1134d02b87381a9b6dafbaa58ff163bd |
--- /dev/null |
+++ b/LayoutTests/media/controls-cast-do-not-fade-out.html |
@@ -0,0 +1,55 @@ |
+<!doctype html> |
+<html> |
+ <head> |
+ <title>This tests that controls do not fade out when the video is playing remotely.</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> |
+ <script src="video-test.js"></script> |
+ </head> |
+ <body> |
+ <video controls></video> |
+ <script> |
+ var controls; |
+ var test; |
+ |
+ function playing() |
+ { |
+ internals.mediaPlayerPlayingRemotelyChanged(video, true); |
+ runAfterHideMediaControlsTimerFired(function() |
+ { |
+ controls = mediaControlsButton(video, "panel"); |
+ testExpected("getComputedStyle(controls).opacity", 1); |
+ |
+ consoleWrite(""); |
+ |
+ internals.mediaPlayerPlayingRemotelyChanged(video, false); |
+ runAfterHideMediaControlsTimerFired(function() |
+ { |
+ testExpected("getComputedStyle(controls).opacity", 0); |
+ |
+ consoleWrite(""); |
+ |
+ test.done(); |
+ }, |
+ video); |
+ }, video); |
+ } |
+ |
+ function loadedmetadata() |
+ { |
+ video.addEventListener("playing", playing); |
+ video.play(); |
+ } |
+ |
+ async_test(function(t) |
+ { |
+ test = t; |
+ findMediaElement(); |
+ video.src = findMediaFile("video", "content/test"); |
+ video.addEventListener("loadedmetadata", loadedmetadata); |
Peter Beverloo
2014/10/13 16:37:24
Can we just bind to the |playing| event here, call
whywhat
2014/10/13 16:56:28
Done.
|
+ }); |
+ </script> |
+ </body> |
+</html> |