| 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 "content/browser/renderer_host/media/audio_input_device_manager.h" | 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 // Opens a non-existing device. | 172 // Opens a non-existing device. |
| 173 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenNotExistingDevice) { | 173 TEST_F(MAYBE_AudioInputDeviceManagerTest, OpenNotExistingDevice) { |
| 174 InSequence s; | 174 InSequence s; |
| 175 | 175 |
| 176 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; | 176 MediaStreamType stream_type = MEDIA_DEVICE_AUDIO_CAPTURE; |
| 177 std::string device_name("device_doesnt_exist"); | 177 std::string device_name("device_doesnt_exist"); |
| 178 std::string device_id("id_doesnt_exist"); | 178 std::string device_id("id_doesnt_exist"); |
| 179 std::string group_id("group_doesnt_exist"); | |
| 180 int sample_rate(0); | 179 int sample_rate(0); |
| 181 int channel_config(0); | 180 int channel_config(0); |
| 182 StreamDeviceInfo dummy_device(stream_type, device_name, device_id, group_id, | 181 StreamDeviceInfo dummy_device(stream_type, device_name, device_id, |
| 183 sample_rate, channel_config, 2048); | 182 sample_rate, channel_config, 2048); |
| 184 | 183 |
| 185 int session_id = manager_->Open(dummy_device); | 184 int session_id = manager_->Open(dummy_device); |
| 186 EXPECT_CALL(*audio_input_listener_, | 185 EXPECT_CALL(*audio_input_listener_, |
| 187 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 186 Opened(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
| 188 .Times(1); | 187 .Times(1); |
| 189 | 188 |
| 190 // Waits for the callback. | 189 // Waits for the callback. |
| 191 base::RunLoop().RunUntilIdle(); | 190 base::RunLoop().RunUntilIdle(); |
| 192 } | 191 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 DCHECK(!info); | 276 DCHECK(!info); |
| 278 | 277 |
| 279 manager_->Close(session_id); | 278 manager_->Close(session_id); |
| 280 EXPECT_CALL(*audio_input_listener_, | 279 EXPECT_CALL(*audio_input_listener_, |
| 281 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) | 280 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) |
| 282 .Times(1); | 281 .Times(1); |
| 283 base::RunLoop().RunUntilIdle(); | 282 base::RunLoop().RunUntilIdle(); |
| 284 } | 283 } |
| 285 | 284 |
| 286 } // namespace content | 285 } // namespace content |
| OLD | NEW |