| OLD | NEW |
| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 class MediaAppTest : public mojo::test::ApplicationTestBase { | 52 class MediaAppTest : public mojo::test::ApplicationTestBase { |
| 53 public: | 53 public: |
| 54 MediaAppTest() | 54 MediaAppTest() |
| 55 : renderer_client_binding_(&renderer_client_), | 55 : renderer_client_binding_(&renderer_client_), |
| 56 video_demuxer_stream_(DemuxerStream::VIDEO) {} | 56 video_demuxer_stream_(DemuxerStream::VIDEO) {} |
| 57 ~MediaAppTest() override {} | 57 ~MediaAppTest() override {} |
| 58 | 58 |
| 59 void SetUp() override { | 59 void SetUp() override { |
| 60 ApplicationTestBase::SetUp(); | 60 ApplicationTestBase::SetUp(); |
| 61 | 61 |
| 62 connection_ = shell()->Connect("mojo:media"); | 62 connection_ = connector()->Connect("mojo:media"); |
| 63 connection_->SetRemoteInterfaceProviderConnectionErrorHandler( | 63 connection_->SetRemoteInterfaceProviderConnectionErrorHandler( |
| 64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this))); | 64 base::Bind(&MediaAppTest::ConnectionClosed, base::Unretained(this))); |
| 65 | 65 |
| 66 connection_->GetInterface(&service_factory_); | 66 connection_->GetInterface(&service_factory_); |
| 67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_)); | 67 service_factory_->CreateCdm(mojo::GetProxy(&cdm_)); |
| 68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); | 68 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); |
| 69 | 69 |
| 70 run_loop_.reset(new base::RunLoop()); | 70 run_loop_.reset(new base::RunLoop()); |
| 71 } | 71 } |
| 72 | 72 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // close the connection. | 162 // close the connection. |
| 163 EXPECT_CALL(*this, ConnectionClosed()) | 163 EXPECT_CALL(*this, ConnectionClosed()) |
| 164 .Times(Exactly(1)) | 164 .Times(Exactly(1)) |
| 165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 165 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |
| 166 service_factory_.reset(); | 166 service_factory_.reset(); |
| 167 | 167 |
| 168 run_loop_->Run(); | 168 run_loop_->Run(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace media | 171 } // namespace media |
| OLD | NEW |