OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // Returns true if machine has audio input device, else returns false. | 83 // Returns true if machine has audio input device, else returns false. |
84 static bool CanRunAudioInputDeviceTests() { | 84 static bool CanRunAudioInputDeviceTests() { |
85 AudioManager* audio_manager = AudioManager::GetAudioManager(); | 85 AudioManager* audio_manager = AudioManager::GetAudioManager(); |
86 if (!audio_manager) | 86 if (!audio_manager) |
87 return false; | 87 return false; |
88 | 88 |
89 return audio_manager->HasAudioInputDevices(); | 89 return audio_manager->HasAudioInputDevices(); |
90 } | 90 } |
91 | 91 |
92 ACTION_P(ExitMessageLoop, message_loop) { | 92 ACTION_P(ExitMessageLoop, message_loop) { |
93 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); | 93 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
94 } | 94 } |
95 | 95 |
96 class AudioInputDeviceManagerTest: public testing::Test { | 96 class AudioInputDeviceManagerTest: public testing::Test { |
97 public: | 97 public: |
98 AudioInputDeviceManagerTest() | 98 AudioInputDeviceManagerTest() |
99 : message_loop_(), | 99 : message_loop_(), |
100 io_thread_(), | 100 io_thread_(), |
101 manager_(), | 101 manager_(), |
102 audio_input_listener_() {} | 102 audio_input_listener_() {} |
103 | 103 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 .Times(1); | 460 .Times(1); |
461 | 461 |
462 manager_->Stop(session_id); | 462 manager_->Stop(session_id); |
463 manager_->Close(session_id); | 463 manager_->Close(session_id); |
464 EXPECT_CALL(*audio_input_listener_, Closed(kAudioCapture, session_id)) | 464 EXPECT_CALL(*audio_input_listener_, Closed(kAudioCapture, session_id)) |
465 .Times(1); | 465 .Times(1); |
466 message_loop_->RunAllPending(); | 466 message_loop_->RunAllPending(); |
467 } | 467 } |
468 | 468 |
469 } // namespace media_stream | 469 } // namespace media_stream |
OLD | NEW |