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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
10 #include "media/audio/audio_input_controller.h" | 10 #include "media/audio/audio_input_controller.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const std::string& message)); | 60 const std::string& message)); |
61 | 61 |
62 private: | 62 private: |
63 DISALLOW_COPY_AND_ASSIGN(MockAudioInputControllerEventHandler); | 63 DISALLOW_COPY_AND_ASSIGN(MockAudioInputControllerEventHandler); |
64 }; | 64 }; |
65 | 65 |
66 // Test fixture. | 66 // Test fixture. |
67 class AudioInputControllerTest : public testing::Test { | 67 class AudioInputControllerTest : public testing::Test { |
68 public: | 68 public: |
69 AudioInputControllerTest() {} | 69 AudioInputControllerTest() {} |
70 virtual ~AudioInputControllerTest() {} | 70 ~AudioInputControllerTest() override {} |
71 | 71 |
72 protected: | 72 protected: |
73 base::MessageLoop message_loop_; | 73 base::MessageLoop message_loop_; |
74 | 74 |
75 private: | 75 private: |
76 DISALLOW_COPY_AND_ASSIGN(AudioInputControllerTest); | 76 DISALLOW_COPY_AND_ASSIGN(AudioInputControllerTest); |
77 }; | 77 }; |
78 | 78 |
79 // Test AudioInputController for create and close without recording audio. | 79 // Test AudioInputController for create and close without recording audio. |
80 TEST_F(AudioInputControllerTest, CreateAndClose) { | 80 TEST_F(AudioInputControllerTest, CreateAndClose) { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 controller->Record(); | 255 controller->Record(); |
256 | 256 |
257 controller->Close(base::MessageLoop::QuitClosure()); | 257 controller->Close(base::MessageLoop::QuitClosure()); |
258 base::MessageLoop::current()->Run(); | 258 base::MessageLoop::current()->Run(); |
259 | 259 |
260 controller->Close(base::MessageLoop::QuitClosure()); | 260 controller->Close(base::MessageLoop::QuitClosure()); |
261 base::MessageLoop::current()->Run(); | 261 base::MessageLoop::current()->Run(); |
262 } | 262 } |
263 | 263 |
264 } // namespace media | 264 } // namespace media |
OLD | NEW |