Index: media/mojo/services/media_mojo_unittest.cc |
diff --git a/media/mojo/services/media_mojo_unittest.cc b/media/mojo/services/media_mojo_unittest.cc |
index db87a1f7764f894e1ca89ebf471649da8ebdafe0..e9079e6c0fc9de623c38a457e793242ad39a2822 100644 |
--- a/media/mojo/services/media_mojo_unittest.cc |
+++ b/media/mojo/services/media_mojo_unittest.cc |
@@ -20,7 +20,7 @@ |
#include "media/mojo/interfaces/decryptor.mojom.h" |
#include "media/mojo/interfaces/renderer.mojom.h" |
#include "media/mojo/interfaces/service_factory.mojom.h" |
-#include "services/shell/public/cpp/shell_test.h" |
+#include "services/shell/public/cpp/service_test.h" |
#include "testing/gmock/include/gmock/gmock.h" |
using testing::Exactly; |
@@ -54,20 +54,20 @@ class MockRendererClient : public mojom::RendererClient { |
DISALLOW_COPY_AND_ASSIGN(MockRendererClient); |
}; |
-class MediaShellTest : public shell::test::ShellTest { |
+class MediaServiceTest : public shell::test::ServiceTest { |
public: |
- MediaShellTest() |
- : ShellTest("exe:media_mojo_unittests"), |
+ MediaServiceTest() |
+ : ServiceTest("exe:media_mojo_unittests"), |
renderer_client_binding_(&renderer_client_), |
video_stream_(DemuxerStream::VIDEO) {} |
- ~MediaShellTest() override {} |
+ ~MediaServiceTest() override {} |
void SetUp() override { |
- ShellTest::SetUp(); |
+ ServiceTest::SetUp(); |
connection_ = connector()->Connect("mojo:media"); |
- connection_->SetConnectionLostClosure( |
- base::Bind(&MediaShellTest::ConnectionClosed, base::Unretained(this))); |
+ connection_->SetConnectionLostClosure(base::Bind( |
+ &MediaServiceTest::ConnectionClosed, base::Unretained(this))); |
connection_->GetInterface(&service_factory_); |
@@ -91,9 +91,10 @@ class MediaShellTest : public shell::test::ShellTest { |
EXPECT_CALL(*this, OnCdmInitializedInternal(expected_result, cdm_id)) |
.Times(Exactly(1)) |
.WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
- cdm_->Initialize( |
- key_system, kSecurityOrigin, mojom::CdmConfig::From(CdmConfig()), |
- base::Bind(&MediaShellTest::OnCdmInitialized, base::Unretained(this))); |
+ cdm_->Initialize(key_system, kSecurityOrigin, |
+ mojom::CdmConfig::From(CdmConfig()), |
+ base::Bind(&MediaServiceTest::OnCdmInitialized, |
+ base::Unretained(this))); |
} |
MOCK_METHOD1(OnRendererInitialized, void(bool)); |
@@ -113,7 +114,7 @@ class MediaShellTest : public shell::test::ShellTest { |
.WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), |
nullptr, std::move(video_stream_proxy), |
- base::Bind(&MediaShellTest::OnRendererInitialized, |
+ base::Bind(&MediaServiceTest::OnRendererInitialized, |
base::Unretained(this))); |
} |
@@ -135,7 +136,7 @@ class MediaShellTest : public shell::test::ShellTest { |
private: |
std::unique_ptr<shell::Connection> connection_; |
- DISALLOW_COPY_AND_ASSIGN(MediaShellTest); |
+ DISALLOW_COPY_AND_ASSIGN(MediaServiceTest); |
}; |
} // namespace |
@@ -144,12 +145,12 @@ class MediaShellTest : public shell::test::ShellTest { |
// even when the loop is idle, we may still have pending events in the pipe. |
#if defined(ENABLE_MOJO_CDM) |
-TEST_F(MediaShellTest, InitializeCdm_Success) { |
+TEST_F(MediaServiceTest, InitializeCdm_Success) { |
InitializeCdm(kClearKeyKeySystem, true, 1); |
run_loop_->Run(); |
} |
-TEST_F(MediaShellTest, InitializeCdm_InvalidKeySystem) { |
+TEST_F(MediaServiceTest, InitializeCdm_InvalidKeySystem) { |
InitializeCdm(kInvalidKeySystem, false, 0); |
run_loop_->Run(); |
} |
@@ -163,18 +164,18 @@ TEST_F(MediaShellTest, InitializeCdm_InvalidKeySystem) { |
#define MAYBE_InitializeRenderer_Success InitializeRenderer_Success |
#endif |
-TEST_F(MediaShellTest, MAYBE_InitializeRenderer_Success) { |
+TEST_F(MediaServiceTest, MAYBE_InitializeRenderer_Success) { |
InitializeRenderer(TestVideoConfig::Normal(), true); |
run_loop_->Run(); |
} |
-TEST_F(MediaShellTest, InitializeRenderer_InvalidConfig) { |
+TEST_F(MediaServiceTest, InitializeRenderer_InvalidConfig) { |
InitializeRenderer(TestVideoConfig::Invalid(), false); |
run_loop_->Run(); |
} |
#endif // defined(ENABLE_MOJO_RENDERER) |
-TEST_F(MediaShellTest, Lifetime) { |
+TEST_F(MediaServiceTest, Lifetime) { |
// Disconnecting CDM and Renderer services doesn't terminate the app. |
cdm_.reset(); |
renderer_.reset(); |