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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls/controls-cast-button.html

Issue 2846713002: [Media] Added feature flag for new remote playback pipeline (Closed)
Patch Set: Fixed failing layout tests Created 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>media controls cast button</title> 2 <title>media controls cast button</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="media-file.js"></script> 5 <script src="../media-file.js"></script>
6 <script src="media-controls.js"></script> 6 <script src="../media-controls.js"></script>
7 <video controls width="500"></video> 7 <video controls width="500"></video>
8 <script> 8 <script>
9 async_test(function(t) { 9 async_test(function(t) {
10 var video = document.querySelector("video"); 10 var video = document.querySelector("video");
11 video.src = findMediaFile("video", "content/test"); 11 video.src = findMediaFile("video", "../content/test");
12 12
13 video.onloadedmetadata = t.step_func_done(function() { 13 video.onloadedmetadata = t.step_func_done(function() {
14 // Should not have a cast button by default 14 // Should not have a cast button by default
15 var button = castButton(video); 15 var button = castButton(video);
16 assert_equals(button.style.display, "none", "button should not be visibl e with no cast devices"); 16 assert_equals(button.style.display, "none", "button should not be visibl e with no cast devices");
17 17
18 // Pretend we have a cast device 18 // Pretend we have a cast device
19 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 19 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
20 20
21 // Now should have cast button 21 // Now should have cast button
(...skipping 16 matching lines...) Expand all
38 // And to the right of the fullscreen button 38 // And to the right of the fullscreen button
39 var fullscreenPosition = mediaControlsButtonCoordinates(video, "fullscre en-button"); 39 var fullscreenPosition = mediaControlsButtonCoordinates(video, "fullscre en-button");
40 assert_greater_than(x, fullscreenPosition[0], "button should be to right of fullscreen button"); 40 assert_greater_than(x, fullscreenPosition[0], "button should be to right of fullscreen button");
41 41
42 // Remove cast device - cast button should go away 42 // Remove cast device - cast button should go away
43 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false); 43 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false);
44 assert_equals(button.style.display, "none", "button should not be visibl e after cast device goes away"); 44 assert_equals(button.style.display, "none", "button should not be visibl e after cast device goes away");
45 }); 45 });
46 }); 46 });
47 </script> 47 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698