OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |