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

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

Issue 2684973004: Remove unnecessary refreshCastButtonVisibility call (Closed)
Patch Set: remove extra blank lines Created 3 years, 10 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></video> 7 <video></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");
(...skipping 16 matching lines...) Expand all
27 var videoRect = video.getBoundingClientRect(); 27 var videoRect = video.getBoundingClientRect();
28 assert_greater_than_equal(rect.top, videoRect.top, "button should be at top left of video"); 28 assert_greater_than_equal(rect.top, videoRect.top, "button should be at top left of video");
29 assert_greater_than_equal(rect.left, videoRect.left, "button should be a t top left of video"); 29 assert_greater_than_equal(rect.left, videoRect.left, "button should be a t top left of video");
30 assert_less_than_equal(rect.bottom, videoRect.top + videoRect.height / 2 , "button should be at top left of video"); 30 assert_less_than_equal(rect.bottom, videoRect.top + videoRect.height / 2 , "button should be at top left of video");
31 assert_less_than_equal(rect.right, videoRect.left + videoRect.width / 2, "button should be at top left of video"); 31 assert_less_than_equal(rect.right, videoRect.left + videoRect.width / 2, "button should be at top left of video");
32 32
33 // Remove cast device - cast button should go away 33 // Remove cast device - cast button should go away
34 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false); 34 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false);
35 assert_equals(button.style.display, "none", "button should not be visibl e after cast device goes away"); 35 assert_equals(button.style.display, "none", "button should not be visibl e after cast device goes away");
36 }); 36 });
37
38 function overlayCastButton(element) {
39 var controlID = "-internal-media-controls-overlay-cast-button";
40 var button = mediaControlsElement(internals.shadowRoot(element).firstChi ld, controlID);
41 if (!button)
42 throw "Failed to find cast button";
43 return button;
44 }
45 }); 37 });
46 </script> 38 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698