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

Side by Side Diff: content/browser/renderer_host/media/audio_input_device_manager_unittest.cc

Issue 99033003: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (!CanRunAudioInputDeviceTests()) 170 if (!CanRunAudioInputDeviceTests())
171 return; 171 return;
172 InSequence s; 172 InSequence s;
173 173
174 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; 174 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE;
175 std::string device_name("device_doesnt_exist"); 175 std::string device_name("device_doesnt_exist");
176 std::string device_id("id_doesnt_exist"); 176 std::string device_id("id_doesnt_exist");
177 int sample_rate(0); 177 int sample_rate(0);
178 int channel_config(0); 178 int channel_config(0);
179 StreamDeviceInfo dummy_device( 179 StreamDeviceInfo dummy_device(
180 stream_type, device_name, device_id, sample_rate, channel_config, 2048); 180 stream_type, device_name, device_id, sample_rate, channel_config, 2048,
181 false);
181 182
182 int session_id = manager_->Open(dummy_device); 183 int session_id = manager_->Open(dummy_device);
183 EXPECT_CALL(*audio_input_listener_, 184 EXPECT_CALL(*audio_input_listener_,
184 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) 185 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id))
185 .Times(1); 186 .Times(1);
186 187
187 // Waits for the callback. 188 // Waits for the callback.
188 message_loop_->RunUntilIdle(); 189 message_loop_->RunUntilIdle();
189 } 190 }
190 191
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 DCHECK(!info); 283 DCHECK(!info);
283 284
284 manager_->Close(session_id); 285 manager_->Close(session_id);
285 EXPECT_CALL(*audio_input_listener_, 286 EXPECT_CALL(*audio_input_listener_,
286 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) 287 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id))
287 .Times(1); 288 .Times(1);
288 message_loop_->RunUntilIdle(); 289 message_loop_->RunUntilIdle();
289 } 290 }
290 291
291 } // namespace content 292 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698