Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: media/audio/audio_input_controller_unittest.cc

Issue 219023003: Disables the check for no data timer for audio on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Record and wait until ten OnData() callbacks are received. 138 // Record and wait until ten OnData() callbacks are received.
139 message_loop_.Run(); 139 message_loop_.Run();
140 140
141 // Close the AudioInputController synchronously. 141 // Close the AudioInputController synchronously.
142 CloseAudioController(controller.get()); 142 CloseAudioController(controller.get());
143 } 143 }
144 144
145 // Test that the AudioInputController reports an error when the input stream 145 // Test that the AudioInputController reports an error when the input stream
146 // stops. This can happen when the underlying audio layer stops feeding data as 146 // stops. This can happen when the underlying audio layer stops feeding data as
147 // a result of a removed microphone device. 147 // a result of a removed microphone device.
148 #if defined(OS_MACOSX) 148 // Disabled due to crbug.com/357569
tommi (sloooow) - chröme 2014/03/31 11:11:52 and crbug.com/357501?
149 // Disabled on Mac due to crbug.com/357501. 149 // TODO(henrika): Remove the test when the timer workaround has been removed.
150 // TODO(tommi): Remove the test when the timer workaround has been removed. 150 TEST_F(AudioInputControllerTest, DISABLED_RecordAndError) {
151 #define MAYBE_RecordAndError DISABLED_RecordAndError
152 #else
153 #define MAYBE_RecordAndError RecordAndError
154 #endif
155 TEST_F(AudioInputControllerTest, MAYBE_RecordAndError) {
156 MockAudioInputControllerEventHandler event_handler; 151 MockAudioInputControllerEventHandler event_handler;
157 int count = 0; 152 int count = 0;
158 153
159 // OnCreated() will be called once. 154 // OnCreated() will be called once.
160 EXPECT_CALL(event_handler, OnCreated(NotNull())) 155 EXPECT_CALL(event_handler, OnCreated(NotNull()))
161 .Times(Exactly(1)); 156 .Times(Exactly(1));
162 157
163 // OnRecording() will be called only once. 158 // OnRecording() will be called only once.
164 EXPECT_CALL(event_handler, OnRecording(NotNull())) 159 EXPECT_CALL(event_handler, OnRecording(NotNull()))
165 .Times(Exactly(1)); 160 .Times(Exactly(1));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 controller->Record(); 252 controller->Record();
258 253
259 controller->Close(base::MessageLoop::QuitClosure()); 254 controller->Close(base::MessageLoop::QuitClosure());
260 base::MessageLoop::current()->Run(); 255 base::MessageLoop::current()->Run();
261 256
262 controller->Close(base::MessageLoop::QuitClosure()); 257 controller->Close(base::MessageLoop::QuitClosure());
263 base::MessageLoop::current()->Run(); 258 base::MessageLoop::current()->Run();
264 } 259 }
265 260
266 } // namespace media 261 } // namespace media
OLDNEW
« media/audio/audio_input_controller.cc ('K') | « media/audio/audio_input_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698