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

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

Issue 2378933005: Don't use cast overlay when using default controls. (Closed)
Patch Set: update tests Created 4 years, 2 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 | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html
diff --git a/third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html b/third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html
index 6e3c9e9b37bfd3459b91a3cfabad9fe1d8bdc662..61054e29ec5053069a7ad53004f729152b791116 100644
--- a/third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html
+++ b/third_party/WebKit/LayoutTests/media/controls-cast-button-narrow.html
@@ -16,16 +16,12 @@ async_test(function(t) {
// Video should not have a cast button since the video is too narrow
var button = castButton(video);
- assert_equals(button.style.display, "none", "button should not be visible with no cast devices");
+ assert_equals(button.style.display, "none", "button should not be visible");
- // It should, however, have an overlay cast button instead
+ // It should not have an overlay cast button too. Instead, the button
+ // should appear in the overflow menu. Tested somewhere else.
button = overlayCastButton(video);
- var rect = button.getBoundingClientRect();
- var videoRect = video.getBoundingClientRect();
- assert_greater_than_equal(rect.top, videoRect.top, "button should be at top left of video");
- assert_greater_than_equal(rect.left, videoRect.left, "button should be at top left of video");
- assert_less_than_equal(rect.bottom, videoRect.top + videoRect.height / 2, "button should be at top left of video");
- assert_less_than_equal(rect.right, videoRect.left + videoRect.width / 2, "button should be at top left of video");
+ assert_equals(button.style.display, "none", "button should not be visible");
});
function castButton(element) {
@@ -38,10 +34,11 @@ async_test(function(t) {
function overlayCastButton(element) {
var controlID = "-internal-media-controls-overlay-cast-button";
- var button = mediaControlsElement(internals.shadowRoot(element).firstChild, controlID);
+ return mediaControlsElement(internals.shadowRoot(element).firstChild, controlID);
+ return button
if (!button)
throw "Failed to find cast button";
return button;
}
});
-</script>
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698