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

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

Issue 2420633002: [Cast] Refresh cast button visibility when disableRemotePlayback attribute changes (Closed)
Patch Set: Refresh visibility only when the attribute's value changes 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 | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2de2a55e3e60428d4c006adb85b9bc162266cad4..31eeadba24631944984dc8d694db43e94a9f8d7c 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
@@ -222,14 +222,16 @@ TEST_F(MediaControlsTest, CastButtonDisableRemotePlaybackAttr) {
mediaControls(), "-internal-media-controls-cast-button");
ASSERT_NE(nullptr, castButton);
+ ASSERT_FALSE(isElementVisible(*castButton));
+ simulateRouteAvailabe();
+ ASSERT_TRUE(isElementVisible(*castButton));
+
mediaControls().mediaElement().setBooleanAttribute(
HTMLNames::disableremoteplaybackAttr, true);
- simulateRouteAvailabe();
ASSERT_FALSE(isElementVisible(*castButton));
mediaControls().mediaElement().setBooleanAttribute(
HTMLNames::disableremoteplaybackAttr, false);
- mediaControls().reset();
ASSERT_TRUE(isElementVisible(*castButton));
}
@@ -247,14 +249,16 @@ TEST_F(MediaControlsTest, CastOverlayDisableRemotePlaybackAttr) {
mediaControls(), "-internal-media-controls-overlay-cast-button");
ASSERT_NE(nullptr, castOverlayButton);
+ ASSERT_FALSE(isElementVisible(*castOverlayButton));
+ simulateRouteAvailabe();
+ ASSERT_TRUE(isElementVisible(*castOverlayButton));
+
mediaControls().mediaElement().setBooleanAttribute(
HTMLNames::disableremoteplaybackAttr, true);
- simulateRouteAvailabe();
ASSERT_FALSE(isElementVisible(*castOverlayButton));
mediaControls().mediaElement().setBooleanAttribute(
HTMLNames::disableremoteplaybackAttr, false);
- mediaControls().reset();
ASSERT_TRUE(isElementVisible(*castOverlayButton));
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698