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

Side by Side Diff: media/mojo/services/media_mojo_unittest.cc

Issue 2016053003: Add audio_device_id in mojo media ServiceFactory CreateRenderer api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix compile error Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); 93 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit));
94 cdm_->Initialize( 94 cdm_->Initialize(
95 key_system, kSecurityOrigin, mojom::CdmConfig::From(CdmConfig()), 95 key_system, kSecurityOrigin, mojom::CdmConfig::From(CdmConfig()),
96 base::Bind(&MediaShellTest::OnCdmInitialized, base::Unretained(this))); 96 base::Bind(&MediaShellTest::OnCdmInitialized, base::Unretained(this)));
97 } 97 }
98 98
99 MOCK_METHOD1(OnRendererInitialized, void(bool)); 99 MOCK_METHOD1(OnRendererInitialized, void(bool));
100 100
101 void InitializeRenderer(const VideoDecoderConfig& video_config, 101 void InitializeRenderer(const VideoDecoderConfig& video_config,
102 bool expected_result) { 102 bool expected_result) {
103 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_)); 103 service_factory_->CreateRenderer(mojo::GetProxy(&renderer_), "");
alokp 2016/06/02 04:47:55 ditto
tianyuwang1 2016/06/02 05:18:39 Done.
104 104
105 video_demuxer_stream_.set_video_decoder_config(video_config); 105 video_demuxer_stream_.set_video_decoder_config(video_config);
106 106
107 mojom::DemuxerStreamPtr video_stream; 107 mojom::DemuxerStreamPtr video_stream;
108 new MojoDemuxerStreamImpl(&video_demuxer_stream_, GetProxy(&video_stream)); 108 new MojoDemuxerStreamImpl(&video_demuxer_stream_, GetProxy(&video_stream));
109 109
110 EXPECT_CALL(*this, OnRendererInitialized(expected_result)) 110 EXPECT_CALL(*this, OnRendererInitialized(expected_result))
111 .Times(Exactly(1)) 111 .Times(Exactly(1))
112 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit)); 112 .WillOnce(InvokeWithoutArgs(run_loop_.get(), &base::RunLoop::Quit));
113 renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(), 113 renderer_->Initialize(renderer_client_binding_.CreateInterfacePtrAndBind(),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // close the connection. 181 // close the connection.
182 EXPECT_CALL(*this, ConnectionClosed()) 182 EXPECT_CALL(*this, ConnectionClosed())
183 .Times(Exactly(1)) 183 .Times(Exactly(1))
184 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); 184 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit));
185 service_factory_.reset(); 185 service_factory_.reset();
186 186
187 run_loop_->Run(); 187 run_loop_->Run();
188 } 188 }
189 189
190 } // namespace media 190 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698