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

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

Issue 2701433003: Hide overlay play button if it can't be shown without clipping (Closed)
Patch Set: Add comments for dependent constants Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 width="100" height="200" controls></video> 7 <video width="100" height="200" controls></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 23 matching lines...) Expand all
34 // If the cast device is lost, we still don't show the cast 34 // If the cast device is lost, we still don't show the cast
35 // button when the video width increases. 35 // button when the video width increases.
36 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false ); 36 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false );
37 video.width = 500; 37 video.width = 500;
38 testRunner.layoutAndPaintAsyncThen(t.step_func_done(function() { 38 testRunner.layoutAndPaintAsyncThen(t.step_func_done(function() {
39 assert_false(isVisible(castButton(video)), "button should no t be visible"); 39 assert_false(isVisible(castButton(video)), "button should no t be visible");
40 })); 40 }));
41 })); 41 }));
42 })); 42 }));
43 }); 43 });
44
45 function isVisible(button) {
46 var computedStyle = getComputedStyle(button);
47 return computedStyle.display !== "none" &&
48 computedStyle.display !== "hidden" &&
49 computedStyle.visibility === "visible";
50 }
51 }); 44 });
52 </script> 45 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/controls/download-button-displays-with-preload-none.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698