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

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp

Issue 2814703002: Media Controls: move time display elements to media_controls module. (Closed)
Patch Set: review comments Created 3 years, 8 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/modules/media_controls/MediaControlsImplTest.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp
index 17e900faa87379a8c190c5ee5e725229728ddc70..3e28be58d7d5ac82444b768e036db76db7ef0d9d 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImplTest.cpp
@@ -21,6 +21,7 @@
#include "core/layout/LayoutObject.h"
#include "core/loader/EmptyClients.h"
#include "core/testing/DummyPageHolder.h"
+#include "modules/media_controls/elements/MediaControlCurrentTimeDisplayElement.h"
#include "platform/heap/Handle.h"
#include "platform/testing/EmptyWebMediaPlayer.h"
#include "platform/testing/HistogramTester.h"
@@ -205,6 +206,9 @@ class MediaControlsImplTest : public ::testing::Test {
MediaControlTimelineElement* TimelineElement() const {
return media_controls_->timeline_;
}
+ MediaControlCurrentTimeDisplayElement* GetCurrentTimeDisplayElement() const {
+ return media_controls_->current_time_display_;
+ }
MockVideoWebMediaPlayer* WebMediaPlayer() {
return static_cast<MockVideoWebMediaPlayer*>(
MediaControls().MediaElement().GetWebMediaPlayer());
@@ -570,10 +574,7 @@ TEST_F(MediaControlsImplTest, TimelineImmediatelyUpdatesCurrentTime) {
EnsureSizing();
MediaControlCurrentTimeDisplayElement* current_time_display =
- static_cast<MediaControlCurrentTimeDisplayElement*>(
- GetElementByShadowPseudoId(
- MediaControls(), "-webkit-media-controls-current-time-display"));
-
+ GetCurrentTimeDisplayElement();
double duration = 600;
LoadMediaWithDuration(duration);

Powered by Google App Engine
This is Rietveld 408576698