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

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

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Rebased again Created 3 years, 5 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/MediaControlsOrientationLockDelegateTest.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
index 9cc4397debae68319800a5488654eb84143d11f5..0d1d59b586118961199374b0291073a5e7646be5 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegateTest.cpp
@@ -44,7 +44,8 @@ class DummyScreenOrientationCallback final : public WebLockOrientationCallback {
void OnError(WebLockOrientationError) override {}
};
-class MockVideoWebMediaPlayer final : public EmptyWebMediaPlayer {
+class MockWebMediaPlayerForOrientationLockDelegate final
+ : public EmptyWebMediaPlayer {
public:
bool HasVideo() const override { return true; }
@@ -75,7 +76,8 @@ void DidExitFullscreen(Document* document) {
document->ServiceScriptedAnimations(WTF::MonotonicallyIncreasingTime());
}
-class MockChromeClient final : public EmptyChromeClient {
+class MockChromeClientForOrientationLockDelegate final
+ : public EmptyChromeClient {
public:
// ChromeClient overrides:
void InstallSupplements(LocalFrame& frame) override {
@@ -106,15 +108,18 @@ class MockChromeClient final : public EmptyChromeClient {
MockWebScreenOrientationClient web_screen_orientation_client_;
};
-class StubLocalFrameClient final : public EmptyLocalFrameClient {
+class StubLocalFrameClientForOrientationLockDelegate final
+ : public EmptyLocalFrameClient {
public:
- static StubLocalFrameClient* Create() { return new StubLocalFrameClient; }
+ static StubLocalFrameClientForOrientationLockDelegate* Create() {
+ return new StubLocalFrameClientForOrientationLockDelegate;
+ }
std::unique_ptr<WebMediaPlayer> CreateWebMediaPlayer(
HTMLMediaElement&,
const WebMediaPlayerSource&,
WebMediaPlayerClient*) override {
- return WTF::MakeUnique<MockVideoWebMediaPlayer>();
+ return WTF::MakeUnique<MockWebMediaPlayerForOrientationLockDelegate>();
}
};
@@ -130,14 +135,15 @@ class MediaControlsOrientationLockDelegateTest : public ::testing::Test {
}
void SetUp() override {
- chrome_client_ = new MockChromeClient();
+ chrome_client_ = new MockChromeClientForOrientationLockDelegate();
Page::PageClients clients;
FillWithEmptyClients(clients);
clients.chrome_client = chrome_client_.Get();
- page_holder_ = DummyPageHolder::Create(IntSize(800, 600), &clients,
- StubLocalFrameClient::Create());
+ page_holder_ = DummyPageHolder::Create(
+ IntSize(800, 600), &clients,
+ StubLocalFrameClientForOrientationLockDelegate::Create());
previous_orientation_event_value_ =
RuntimeEnabledFeatures::OrientationEventEnabled();
@@ -232,15 +238,18 @@ class MediaControlsOrientationLockDelegateTest : public ::testing::Test {
->orientation_lock_delegate_->ComputeOrientationLock();
}
- MockChromeClient& ChromeClient() const { return *chrome_client_; }
+ MockChromeClientForOrientationLockDelegate& ChromeClient() const {
+ return *chrome_client_;
+ }
HTMLVideoElement& Video() const { return *video_; }
Document& GetDocument() const { return page_holder_->GetDocument(); }
MockWebScreenOrientationClient& ScreenOrientationClient() const {
return ChromeClient().WebScreenOrientationClient();
}
- MockVideoWebMediaPlayer& MockWebMediaPlayer() const {
- return *static_cast<MockVideoWebMediaPlayer*>(Video().GetWebMediaPlayer());
+ MockWebMediaPlayerForOrientationLockDelegate& MockWebMediaPlayer() const {
+ return *static_cast<MockWebMediaPlayerForOrientationLockDelegate*>(
+ Video().GetWebMediaPlayer());
}
private:
@@ -251,7 +260,7 @@ class MediaControlsOrientationLockDelegateTest : public ::testing::Test {
bool previous_video_rotate_to_fullscreen_value_;
std::unique_ptr<DummyPageHolder> page_holder_;
Persistent<HTMLVideoElement> video_;
- Persistent<MockChromeClient> chrome_client_;
+ Persistent<MockChromeClientForOrientationLockDelegate> chrome_client_;
};
class MediaControlsOrientationLockAndRotateToFullscreenDelegateTest

Powered by Google App Engine
This is Rietveld 408576698