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

Unified Diff: media/remoting/renderer_controller_unittest.cc

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 11 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 | « media/remoting/renderer_controller.cc ('k') | media/remoting/rpc.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/renderer_controller_unittest.cc
diff --git a/media/remoting/remoting_renderer_controller_unittest.cc b/media/remoting/renderer_controller_unittest.cc
similarity index 44%
rename from media/remoting/remoting_renderer_controller_unittest.cc
rename to media/remoting/renderer_controller_unittest.cc
index abf6eb93b4d374baf62a157e1993e8670af4694e..0ed58a3d8dd38299681a05420f6619f7e41b3225 100644
--- a/media/remoting/remoting_renderer_controller_unittest.cc
+++ b/media/remoting/renderer_controller_unittest.cc
@@ -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 "media/remoting/remoting_renderer_controller.h"
+#include "media/remoting/renderer_controller.h"
#include "base/callback.h"
#include "base/memory/ptr_util.h"
@@ -14,12 +14,14 @@
#include "media/base/media_util.h"
#include "media/base/test_helpers.h"
#include "media/base/video_decoder_config.h"
-#include "media/remoting/fake_remoting_controller.h"
+#include "media/remoting/fake_remoter.h"
#include "media/remoting/remoting_cdm.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
+namespace remoting {
+
namespace {
constexpr mojom::RemotingSinkCapabilities kAllCapabilities =
@@ -43,18 +45,17 @@ PipelineMetadata EncryptedMetadata() {
} // namespace
-class RemotingRendererControllerTest : public ::testing::Test {
+class RendererControllerTest : public ::testing::Test {
public:
- RemotingRendererControllerTest() {}
- ~RemotingRendererControllerTest() override {}
+ RendererControllerTest() {}
+ ~RendererControllerTest() override {}
void TearDown() final { RunUntilIdle(); }
static void RunUntilIdle() { base::RunLoop().RunUntilIdle(); }
void ToggleRenderer() {
- is_rendering_remotely_ =
- remoting_renderer_controller_->remote_rendering_started();
+ is_rendering_remotely_ = controller_->remote_rendering_started();
}
void CreateCdm(bool is_remoting) { is_remoting_cdm_ = is_remoting; }
@@ -62,292 +63,288 @@ class RemotingRendererControllerTest : public ::testing::Test {
base::MessageLoop message_loop_;
protected:
- std::unique_ptr<RemotingRendererController> remoting_renderer_controller_;
+ std::unique_ptr<RendererController> controller_;
bool is_rendering_remotely_ = false;
bool is_remoting_cdm_ = false;
private:
- DISALLOW_COPY_AND_ASSIGN(RemotingRendererControllerTest);
+ DISALLOW_COPY_AND_ASSIGN(RendererControllerTest);
};
-TEST_F(RemotingRendererControllerTest, ToggleRendererOnFullscreenChange) {
+TEST_F(RendererControllerTest, ToggleRendererOnFullscreenChange) {
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> remoting_source_impl =
- CreateRemotingSourceImpl(false);
- remoting_renderer_controller_ =
- base::MakeUnique<RemotingRendererController>(remoting_source_impl);
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ const scoped_refptr<SharedSession> shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ controller_ = base::MakeUnique<RendererController>(shared_session);
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_source_impl->OnSinkAvailable(kAllCapabilities);
+ shared_session->OnSinkAvailable(kAllCapabilities);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(DefaultMetadata());
+ controller_->OnMetadataChanged(DefaultMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_); // All requirements now satisfied.
// Leaving fullscreen should shut down remoting.
- remoting_renderer_controller_->OnExitedFullscreen();
+ controller_->OnExitedFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
}
-TEST_F(RemotingRendererControllerTest, ToggleRendererOnSinkCapabilities) {
+TEST_F(RendererControllerTest, ToggleRendererOnSinkCapabilities) {
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> remoting_source_impl =
- CreateRemotingSourceImpl(false);
- remoting_renderer_controller_ =
- base::MakeUnique<RemotingRendererController>(remoting_source_impl);
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ const scoped_refptr<SharedSession> shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ controller_ = base::MakeUnique<RendererController>(shared_session);
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(DefaultMetadata());
+ controller_->OnMetadataChanged(DefaultMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
// An available sink that does not support remote rendering should not cause
// the controller to toggle remote rendering on.
- remoting_source_impl->OnSinkAvailable(mojom::RemotingSinkCapabilities::NONE);
+ shared_session->OnSinkAvailable(mojom::RemotingSinkCapabilities::NONE);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_source_impl->OnSinkGone(); // Bye-bye useless sink!
+ shared_session->OnSinkGone(); // Bye-bye useless sink!
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
// A sink that *does* support remote rendering *does* cause the controller to
// toggle remote rendering on.
- remoting_source_impl->OnSinkAvailable(kAllCapabilities);
+ shared_session->OnSinkAvailable(kAllCapabilities);
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_);
- remoting_renderer_controller_->OnExitedFullscreen();
+ controller_->OnExitedFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
}
-TEST_F(RemotingRendererControllerTest, ToggleRendererOnDisableChange) {
+TEST_F(RendererControllerTest, ToggleRendererOnDisableChange) {
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> remoting_source_impl =
- CreateRemotingSourceImpl(false);
- remoting_renderer_controller_ =
- base::MakeUnique<RemotingRendererController>(remoting_source_impl);
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ const scoped_refptr<SharedSession> shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ controller_ = base::MakeUnique<RendererController>(shared_session);
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(true);
+ controller_->OnRemotePlaybackDisabled(true);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_source_impl->OnSinkAvailable(kAllCapabilities);
+ shared_session->OnSinkAvailable(kAllCapabilities);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(DefaultMetadata());
+ controller_->OnMetadataChanged(DefaultMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_); // All requirements now satisfied.
// If the page disables remote playback (e.g., by setting the
// disableRemotePlayback attribute), this should shut down remoting.
- remoting_renderer_controller_->OnRemotePlaybackDisabled(true);
+ controller_->OnRemotePlaybackDisabled(true);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
}
-TEST_F(RemotingRendererControllerTest, StartFailed) {
+TEST_F(RendererControllerTest, StartFailed) {
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> remoting_source_impl =
- CreateRemotingSourceImpl(true);
- remoting_renderer_controller_ =
- base::MakeUnique<RemotingRendererController>(remoting_source_impl);
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ const scoped_refptr<SharedSession> shared_session =
+ FakeRemoterFactory::CreateSharedSession(true);
+ controller_ = base::MakeUnique<RendererController>(shared_session);
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_source_impl->OnSinkAvailable(kAllCapabilities);
+ shared_session->OnSinkAvailable(kAllCapabilities);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(DefaultMetadata());
+ controller_->OnMetadataChanged(DefaultMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
}
-TEST_F(RemotingRendererControllerTest, EncryptedWithRemotingCdm) {
+TEST_F(RendererControllerTest, EncryptedWithRemotingCdm) {
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_ = base::MakeUnique<RemotingRendererController>(
- CreateRemotingSourceImpl(false));
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ controller_ = base::MakeUnique<RendererController>(
+ FakeRemoterFactory::CreateSharedSession(false));
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(EncryptedMetadata());
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnMetadataChanged(EncryptedMetadata());
+ controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> cdm_remoting_source_impl =
- CreateRemotingSourceImpl(false);
- std::unique_ptr<RemotingCdmController> remoting_cdm_controller =
- base::MakeUnique<RemotingCdmController>(cdm_remoting_source_impl);
- cdm_remoting_source_impl->OnSinkAvailable(kAllCapabilities);
- remoting_cdm_controller->ShouldCreateRemotingCdm(base::Bind(
- &RemotingRendererControllerTest::CreateCdm, base::Unretained(this)));
+ const scoped_refptr<SharedSession> cdm_shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ std::unique_ptr<RemotingCdmController> cdm_controller =
+ base::MakeUnique<RemotingCdmController>(cdm_shared_session);
+ cdm_shared_session->OnSinkAvailable(kAllCapabilities);
+ cdm_controller->ShouldCreateRemotingCdm(
+ base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
EXPECT_TRUE(is_remoting_cdm_);
- // Create a RemotingCdm with |remoting_cdm_controller|.
- scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
+ // Create a RemotingCdm with |cdm_controller|.
+ const scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
std::string(), GURL(), CdmConfig(), SessionMessageCB(), SessionClosedCB(),
SessionKeysChangeCB(), SessionExpirationUpdateCB(), CdmCreatedCB(),
- std::move(remoting_cdm_controller));
+ std::move(cdm_controller));
std::unique_ptr<RemotingCdmContext> remoting_cdm_context =
base::MakeUnique<RemotingCdmContext>(remoting_cdm.get());
- remoting_renderer_controller_->OnSetCdm(remoting_cdm_context.get());
+ controller_->OnSetCdm(remoting_cdm_context.get());
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_);
// For encrypted contents, entering/exiting full screen has no effect.
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_);
- remoting_renderer_controller_->OnExitedFullscreen();
+ controller_->OnExitedFullscreen();
RunUntilIdle();
EXPECT_TRUE(is_rendering_remotely_);
- EXPECT_NE(RemotingSessionState::SESSION_PERMANENTLY_STOPPED,
- remoting_renderer_controller_->remoting_source()->state());
- cdm_remoting_source_impl->OnSinkGone();
+ EXPECT_NE(SharedSession::SESSION_PERMANENTLY_STOPPED,
+ controller_->session()->state());
+ cdm_shared_session->OnSinkGone();
RunUntilIdle();
- EXPECT_EQ(RemotingSessionState::SESSION_PERMANENTLY_STOPPED,
- remoting_renderer_controller_->remoting_source()->state());
+ EXPECT_EQ(SharedSession::SESSION_PERMANENTLY_STOPPED,
+ controller_->session()->state());
// Don't switch renderer in this case. Still using the remoting renderer to
// show the failure interstitial.
EXPECT_TRUE(is_rendering_remotely_);
}
-TEST_F(RemotingRendererControllerTest, EncryptedWithLocalCdm) {
+TEST_F(RendererControllerTest, EncryptedWithLocalCdm) {
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> renderer_remoting_source_impl =
- CreateRemotingSourceImpl(false);
- remoting_renderer_controller_ = base::MakeUnique<RemotingRendererController>(
- renderer_remoting_source_impl);
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ const scoped_refptr<SharedSession> initial_shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ controller_ = base::MakeUnique<RendererController>(initial_shared_session);
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- renderer_remoting_source_impl->OnSinkAvailable(kAllCapabilities);
+ initial_shared_session->OnSinkAvailable(kAllCapabilities);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(EncryptedMetadata());
+ controller_->OnMetadataChanged(EncryptedMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> cdm_remoting_source_impl =
- CreateRemotingSourceImpl(true);
- std::unique_ptr<RemotingCdmController> remoting_cdm_controller =
- base::MakeUnique<RemotingCdmController>(cdm_remoting_source_impl);
- cdm_remoting_source_impl->OnSinkAvailable(kAllCapabilities);
- remoting_cdm_controller->ShouldCreateRemotingCdm(base::Bind(
- &RemotingRendererControllerTest::CreateCdm, base::Unretained(this)));
+ const scoped_refptr<SharedSession> cdm_shared_session =
+ FakeRemoterFactory::CreateSharedSession(true);
+ std::unique_ptr<RemotingCdmController> cdm_controller =
+ base::MakeUnique<RemotingCdmController>(cdm_shared_session);
+ cdm_shared_session->OnSinkAvailable(kAllCapabilities);
+ cdm_controller->ShouldCreateRemotingCdm(
+ base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
EXPECT_FALSE(is_remoting_cdm_);
}
-TEST_F(RemotingRendererControllerTest, EncryptedWithFailedRemotingCdm) {
+TEST_F(RendererControllerTest, EncryptedWithFailedRemotingCdm) {
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_ = base::MakeUnique<RemotingRendererController>(
- CreateRemotingSourceImpl(false));
- remoting_renderer_controller_->SetSwitchRendererCallback(base::Bind(
- &RemotingRendererControllerTest::ToggleRenderer, base::Unretained(this)));
+ controller_ = base::MakeUnique<RendererController>(
+ FakeRemoterFactory::CreateSharedSession(false));
+ controller_->SetSwitchRendererCallback(base::Bind(
+ &RendererControllerTest::ToggleRenderer, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnEnteredFullscreen();
+ controller_->OnEnteredFullscreen();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnMetadataChanged(EncryptedMetadata());
+ controller_->OnMetadataChanged(EncryptedMetadata());
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnRemotePlaybackDisabled(false);
+ controller_->OnRemotePlaybackDisabled(false);
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- remoting_renderer_controller_->OnPlaying();
+ controller_->OnPlaying();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- scoped_refptr<RemotingSourceImpl> cdm_remoting_source_impl =
- CreateRemotingSourceImpl(false);
- std::unique_ptr<RemotingCdmController> remoting_cdm_controller =
- base::MakeUnique<RemotingCdmController>(cdm_remoting_source_impl);
- cdm_remoting_source_impl->OnSinkAvailable(kAllCapabilities);
- remoting_cdm_controller->ShouldCreateRemotingCdm(base::Bind(
- &RemotingRendererControllerTest::CreateCdm, base::Unretained(this)));
+ const scoped_refptr<SharedSession> cdm_shared_session =
+ FakeRemoterFactory::CreateSharedSession(false);
+ std::unique_ptr<RemotingCdmController> cdm_controller =
+ base::MakeUnique<RemotingCdmController>(cdm_shared_session);
+ cdm_shared_session->OnSinkAvailable(kAllCapabilities);
+ cdm_controller->ShouldCreateRemotingCdm(
+ base::Bind(&RendererControllerTest::CreateCdm, base::Unretained(this)));
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
EXPECT_TRUE(is_remoting_cdm_);
- cdm_remoting_source_impl->OnSinkGone();
+ cdm_shared_session->OnSinkGone();
RunUntilIdle();
EXPECT_FALSE(is_rendering_remotely_);
- EXPECT_NE(RemotingSessionState::SESSION_PERMANENTLY_STOPPED,
- remoting_renderer_controller_->remoting_source()->state());
+ EXPECT_NE(SharedSession::SESSION_PERMANENTLY_STOPPED,
+ controller_->session()->state());
- scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
+ const scoped_refptr<RemotingCdm> remoting_cdm = new RemotingCdm(
std::string(), GURL(), CdmConfig(), SessionMessageCB(), SessionClosedCB(),
SessionKeysChangeCB(), SessionExpirationUpdateCB(), CdmCreatedCB(),
- std::move(remoting_cdm_controller));
+ std::move(cdm_controller));
std::unique_ptr<RemotingCdmContext> remoting_cdm_context =
base::MakeUnique<RemotingCdmContext>(remoting_cdm.get());
- remoting_renderer_controller_->OnSetCdm(remoting_cdm_context.get());
+ controller_->OnSetCdm(remoting_cdm_context.get());
RunUntilIdle();
// Switch to using the remoting renderer, even when the remoting CDM session
// was already terminated, to show the failure interstitial.
EXPECT_TRUE(is_rendering_remotely_);
- EXPECT_EQ(RemotingSessionState::SESSION_PERMANENTLY_STOPPED,
- remoting_renderer_controller_->remoting_source()->state());
+ EXPECT_EQ(SharedSession::SESSION_PERMANENTLY_STOPPED,
+ controller_->session()->state());
}
+} // namespace remoting
} // namespace media
« no previous file with comments | « media/remoting/renderer_controller.cc ('k') | media/remoting/rpc.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698