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

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: Minor change based on the comment Created 4 years, 5 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
« no previous file with comments | « media/mojo/interfaces/service_factory.mojom ('k') | media/mojo/services/mojo_media_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « media/mojo/interfaces/service_factory.mojom ('k') | media/mojo/services/mojo_media_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698