| 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.h" | 10 #include "base/message_loop.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // Opens a non-existing device. | 197 // Opens a non-existing device. |
| 198 TEST_F(AudioInputDeviceManagerTest, OpenNotExistingDevice) { | 198 TEST_F(AudioInputDeviceManagerTest, OpenNotExistingDevice) { |
| 199 if (!CanRunAudioInputDeviceTests()) | 199 if (!CanRunAudioInputDeviceTests()) |
| 200 return; | 200 return; |
| 201 InSequence s; | 201 InSequence s; |
| 202 | 202 |
| 203 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; | 203 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; |
| 204 std::string device_name("device_doesnt_exist"); | 204 std::string device_name("device_doesnt_exist"); |
| 205 std::string device_id("id_doesnt_exist"); | 205 std::string device_id("id_doesnt_exist"); |
| 206 StreamDeviceInfo dummy_device(stream_type, device_name, device_id, false); | 206 int sample_rate(0); |
| 207 int channel_config(0); |
| 208 StreamDeviceInfo dummy_device( |
| 209 stream_type, device_name, device_id, sample_rate, channel_config, false); |
| 207 | 210 |
| 208 int session_id = manager_->Open(dummy_device); | 211 int session_id = manager_->Open(dummy_device); |
| 209 EXPECT_CALL(*audio_input_listener_, | 212 EXPECT_CALL(*audio_input_listener_, |
| 210 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 213 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
| 211 .Times(1); | 214 .Times(1); |
| 212 | 215 |
| 213 // Waits for the callback. | 216 // Waits for the callback. |
| 214 message_loop_->RunUntilIdle(); | 217 message_loop_->RunUntilIdle(); |
| 215 } | 218 } |
| 216 | 219 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 469 |
| 467 manager_->Stop(session_id); | 470 manager_->Stop(session_id); |
| 468 manager_->Close(session_id); | 471 manager_->Close(session_id); |
| 469 EXPECT_CALL(*audio_input_listener_, | 472 EXPECT_CALL(*audio_input_listener_, |
| 470 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 473 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
| 471 .Times(1); | 474 .Times(1); |
| 472 message_loop_->RunUntilIdle(); | 475 message_loop_->RunUntilIdle(); |
| 473 } | 476 } |
| 474 | 477 |
| 475 } // namespace content | 478 } // namespace content |
| OLD | NEW |