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

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

Issue 2795783004: Move core MediaControls implementation to modules/media_controls/. (Closed)
Patch Set: rebase 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
« no previous file with comments | « third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.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/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
similarity index 95%
rename from third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp
rename to third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
index 2acd74091dbe21efb507d1f6d0448df2bc5ce418..6a3189176d85327d351fca87591a59e41277574e 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlsOrientationLockDelegateTest.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "core/html/shadow/MediaControlsOrientationLockDelegate.h"
+#include "modules/media_controls/MediaControlsOrientationLockDelegate.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentUserGestureToken.h"
@@ -10,9 +10,9 @@
#include "core/frame/ScreenOrientationController.h"
#include "core/html/HTMLAudioElement.h"
#include "core/html/HTMLVideoElement.h"
-#include "core/html/shadow/MediaControls.h"
#include "core/loader/EmptyClients.h"
#include "core/testing/DummyPageHolder.h"
+#include "modules/media_controls/MediaControlsImpl.h"
#include "platform/UserGestureIndicator.h"
#include "platform/testing/EmptyWebMediaPlayer.h"
#include "platform/testing/UnitTestHelpers.h"
@@ -132,7 +132,8 @@ class MediaControlsOrientationLockDelegateTest : public ::testing::Test {
}
static bool hasDelegate(const MediaControls& mediaControls) {
- return !!mediaControls.m_orientationLockDelegate;
+ return !!static_cast<const MediaControlsImpl*>(&mediaControls)
+ ->m_orientationLockDelegate;
}
void simulateEnterFullscreen() {
@@ -165,30 +166,33 @@ class MediaControlsOrientationLockDelegateTest : public ::testing::Test {
video().setNetworkState(state);
}
+ MediaControlsImpl* mediaControls() const {
+ return static_cast<MediaControlsImpl*>(m_video->mediaControls());
+ }
+
void checkStatePendingFullscreen() const {
EXPECT_EQ(MediaControlsOrientationLockDelegate::State::PendingFullscreen,
- m_video->mediaControls()->m_orientationLockDelegate->m_state);
+ mediaControls()->m_orientationLockDelegate->m_state);
}
void checkStatePendingMetadata() const {
EXPECT_EQ(MediaControlsOrientationLockDelegate::State::PendingMetadata,
- m_video->mediaControls()->m_orientationLockDelegate->m_state);
+ mediaControls()->m_orientationLockDelegate->m_state);
}
void checkStateMaybeLockedFullscreen() const {
EXPECT_EQ(
MediaControlsOrientationLockDelegate::State::MaybeLockedFullscreen,
- m_video->mediaControls()->m_orientationLockDelegate->m_state);
+ mediaControls()->m_orientationLockDelegate->m_state);
}
bool delegateWillUnlockFullscreen() const {
- return m_video->mediaControls()
+ return mediaControls()
->m_orientationLockDelegate->m_shouldUnlockOrientation;
}
WebScreenOrientationLockType computeOrientationLock() const {
- return m_video->mediaControls()
- ->m_orientationLockDelegate->computeOrientationLock();
+ return mediaControls()->m_orientationLockDelegate->computeOrientationLock();
}
MockChromeClient& chromeClient() const { return *m_chromeClient; }
« no previous file with comments | « third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698