| 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 e2b46f8da164b7b29710528a1e61addc1e01bdb6..6b6482a77aedffb4d9ed0605f7cb4a8826dde6d9 100644
|
| --- a/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
|
| +++ b/third_party/WebKit/Source/core/html/shadow/MediaControlsTest.cpp
|
| @@ -72,6 +72,13 @@ protected:
|
| m_mediaControls->mediaElement().remoteRouteAvailabilityChanged(true);
|
| }
|
|
|
| + void ensureLayout()
|
| + {
|
| + // Force a relayout, so that the controls know the width. Otherwise,
|
| + // they don't know if, for example, the cast button will fit.
|
| + m_mediaControls->mediaElement().clientWidth();
|
| + }
|
| +
|
| MediaControls& mediaControls() { return *m_mediaControls; }
|
| Document& document() { return m_pageHolder->document(); }
|
|
|
| @@ -133,6 +140,7 @@ TEST_F(MediaControlsTest, ResetDoesNotTriggerInitialLayout)
|
|
|
| TEST_F(MediaControlsTest, CastButtonRequiresRoute)
|
| {
|
| + ensureLayout();
|
| mediaControls().mediaElement().setBooleanAttribute(HTMLNames::controlsAttr, true);
|
|
|
| Element* castButton = getElementByShadowPseudoId(mediaControls(), "-internal-media-controls-cast-button");
|
| @@ -146,6 +154,7 @@ TEST_F(MediaControlsTest, CastButtonRequiresRoute)
|
|
|
| TEST_F(MediaControlsTest, CastButtonDisableRemotePlaybackAttr)
|
| {
|
| + ensureLayout();
|
| mediaControls().mediaElement().setBooleanAttribute(HTMLNames::controlsAttr, true);
|
|
|
| Element* castButton = getElementByShadowPseudoId(mediaControls(), "-internal-media-controls-cast-button");
|
|
|