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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp

Issue 2484973005: [Blink, RemotePlaybackAPI] Create WebRemotePlaybackClient in HTMLMediaElement ctor to avoid lazy in… (Closed)
Patch Set: Fixed compile for EmptyClients.cpp Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLVideoElement.h" 5 #include "core/html/HTMLVideoElement.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/DocumentUserGestureToken.h" 8 #include "core/dom/DocumentUserGestureToken.h"
9 #include "core/loader/EmptyClients.h" 9 #include "core/loader/EmptyClients.h"
10 #include "core/page/NetworkStateNotifier.h" 10 #include "core/page/NetworkStateNotifier.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class StubFrameLoaderClient : public EmptyFrameLoaderClient { 67 class StubFrameLoaderClient : public EmptyFrameLoaderClient {
68 public: 68 public:
69 static StubFrameLoaderClient* create() { return new StubFrameLoaderClient; } 69 static StubFrameLoaderClient* create() { return new StubFrameLoaderClient; }
70 70
71 std::unique_ptr<WebMediaPlayer> createWebMediaPlayer( 71 std::unique_ptr<WebMediaPlayer> createWebMediaPlayer(
72 HTMLMediaElement&, 72 HTMLMediaElement&,
73 const WebMediaPlayerSource&, 73 const WebMediaPlayerSource&,
74 WebMediaPlayerClient*) override { 74 WebMediaPlayerClient*) override {
75 return wrapUnique(new MockWebMediaPlayer); 75 return wrapUnique(new MockWebMediaPlayer);
76 } 76 }
77
78 WebRemotePlaybackClient* createWebRemotePlaybackClient(
79 ScriptState*,
80 HTMLMediaElement&) override {
81 return nullptr;
82 }
77 }; 83 };
78 84
79 } // namespace 85 } // namespace
80 86
81 class HTMLVideoElementTest : public ::testing::Test { 87 class HTMLVideoElementTest : public ::testing::Test {
82 protected: 88 protected:
83 HTMLVideoElementTest() 89 HTMLVideoElementTest()
84 : m_dummyPageHolder( 90 : m_dummyPageHolder(
85 DummyPageHolder::create(IntSize(640, 360), 91 DummyPageHolder::create(IntSize(640, 360),
86 nullptr, 92 nullptr,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ::testing::Mock::VerifyAndClearExpectations(player); 153 ::testing::Mock::VerifyAndClearExpectations(player);
148 154
149 // On play, the strategy is set to normal. 155 // On play, the strategy is set to normal.
150 EXPECT_CALL(*player, 156 EXPECT_CALL(*player,
151 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); 157 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
152 m_video->play(); 158 m_video->play();
153 ::testing::Mock::VerifyAndClearExpectations(player); 159 ::testing::Mock::VerifyAndClearExpectations(player);
154 } 160 }
155 161
156 } // namespace blink 162 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698