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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 cdm_->Initialize(key_system, kSecurityOrigin, | 97 cdm_->Initialize(key_system, kSecurityOrigin, |
98 mojom::CdmConfig::From(CdmConfig()), | 98 mojom::CdmConfig::From(CdmConfig()), |
99 base::Bind(&MediaServiceTest::OnCdmInitialized, | 99 base::Bind(&MediaServiceTest::OnCdmInitialized, |
100 base::Unretained(this))); | 100 base::Unretained(this))); |
101 } | 101 } |
102 | 102 |
103 MOCK_METHOD1(OnRendererInitialized, void(bool)); | 103 MOCK_METHOD1(OnRendererInitialized, void(bool)); |
104 | 104 |
105 void InitializeRenderer(const VideoDecoderConfig& video_config, | 105 void InitializeRenderer(const VideoDecoderConfig& video_config, |
106 bool expected_result) { | 106 bool expected_result) { |
107 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); | 107 service_factory_->CreateRenderer(std::string(), mojo::GetProxy(&renderer_)); |
108 | 108 |
109 video_stream_.set_video_decoder_config(video_config); | 109 video_stream_.set_video_decoder_config(video_config); |
110 | 110 |
111 mojom::DemuxerStreamPtr video_stream_proxy; | 111 mojom::DemuxerStreamPtr video_stream_proxy; |
112 mojo_video_stream_.reset(new MojoDemuxerStreamImpl( | 112 mojo_video_stream_.reset(new MojoDemuxerStreamImpl( |
113 &video_stream_, GetProxy(&video_stream_proxy))); | 113 &video_stream_, GetProxy(&video_stream_proxy))); |
114 | 114 |
115 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) | 115 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) |
116 .Times(Exactly(1)) | 116 .Times(Exactly(1)) |
117 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); | 117 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); |
(...skipping 69 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 |