| 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 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 99 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
| 100 cdm_->Initialize( | 100 cdm_->Initialize( |
| 101 key_system, kSecurityOrigin, mojom::CdmConfig::From(CdmConfig()), | 101 key_system, kSecurityOrigin, mojom::CdmConfig::From(CdmConfig()), |
| 102 base::Bind(&MediaShellTest::OnCdmInitialized, base::Unretained(this))); | 102 base::Bind(&MediaShellTest::OnCdmInitialized, base::Unretained(this))); |
| 103 } | 103 } |
| 104 | 104 |
| 105 MOCK_METHOD1(OnRendererInitialized, void(bool)); | 105 MOCK_METHOD1(OnRendererInitialized, void(bool)); |
| 106 | 106 |
| 107 void InitializeRenderer(const VideoDecoderConfig& video_config, | 107 void InitializeRenderer(const VideoDecoderConfig& video_config, |
| 108 bool expected_result) { | 108 bool expected_result) { |
| 109 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); | 109 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_), ""); |
| 110 | 110 |
| 111 video_demuxer_stream_.set_video_decoder_config(video_config); | 111 video_demuxer_stream_.set_video_decoder_config(video_config); |
| 112 | 112 |
| 113 mojom::DemuxerStreamPtr video_stream; | 113 mojom::DemuxerStreamPtr video_stream; |
| 114 new MojoDemuxerStreamImpl(&video_demuxer_stream_, GetProxy(&video_stream)); | 114 new MojoDemuxerStreamImpl(&video_demuxer_stream_, GetProxy(&video_stream)); |
| 115 | 115 |
| 116 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) | 116 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) |
| 117 .Times(Exactly(1)) | 117 .Times(Exactly(1)) |
| 118 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 118 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
| 119 renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), | 119 renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // close the connection. | 187 // close the connection. |
| 188 EXPECT_CALL(*this, ConnectionClosed()) | 188 EXPECT_CALL(*this, ConnectionClosed()) |
| 189 .Times(Exactly(1)) | 189 .Times(Exactly(1)) |
| 190 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); | 190 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); |
| 191 service_factory_.reset(); | 191 service_factory_.reset(); |
| 192 | 192 |
| 193 run_loop_->Run(); | 193 run_loop_->Run(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace media | 196 } // namespace media |
| OLD | NEW |