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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp

Issue 2692903002: Don't show media controls when there is a persistent video. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
index 685b14cd1c28754d9f67aa512892e13a2b30ff86..7084123c49efc92006176de56571a9f30e50ece6 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
@@ -293,6 +293,22 @@ TEST_F(MediaControlsTest, CastOverlayDisableRemotePlaybackAttr) {
ASSERT_TRUE(isElementVisible(*castOverlayButton));
}
+TEST_F(MediaControlsTest, CastOverlayMediaControlsDisabled) {
+ Element* castOverlayButton = getElementByShadowPseudoId(
+ mediaControls(), "-internal-media-controls-overlay-cast-button");
+ ASSERT_NE(nullptr, castOverlayButton);
+
+ EXPECT_FALSE(isElementVisible(*castOverlayButton));
+ simulateRouteAvailabe();
+ EXPECT_TRUE(isElementVisible(*castOverlayButton));
+
+ document().settings()->setMediaControlsEnabled(false);
+ EXPECT_FALSE(isElementVisible(*castOverlayButton));
+
+ document().settings()->setMediaControlsEnabled(true);
+ EXPECT_TRUE(isElementVisible(*castOverlayButton));
+}
+
TEST_F(MediaControlsTest, KeepControlsVisibleIfOverflowListVisible) {
Element* overflowList = getElementByShadowPseudoId(
mediaControls(), "-internal-media-controls-overflow-menu-list");
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/MediaControls.cpp ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698