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

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

Issue 1811003002: Enable material design media playback UI on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_media_ui_desktop
Patch Set: cleanup. Created 4 years, 7 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/LayoutTests/virtual/gpu/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt ('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 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");
« no previous file with comments | « third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-composite-repaint-by-all-imagesource-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698