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

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

Issue 1396113004: Don't use base::MessageLoop::{Quit,QuitClosure} in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/environment.h" 6 #include "base/environment.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 DVLOG(0) << " samples_per_packet: " << aisw.samples_per_packet(); 412 DVLOG(0) << " samples_per_packet: " << aisw.samples_per_packet();
413 DVLOG(0) << " channels : " << aisw.channels(); 413 DVLOG(0) << " channels : " << aisw.channels();
414 414
415 ais->Start(&full_duplex); 415 ais->Start(&full_duplex);
416 aos->Start(&full_duplex); 416 aos->Start(&full_duplex);
417 417
418 // Wait for approximately 10 seconds. The user shall hear his own voice 418 // Wait for approximately 10 seconds. The user shall hear his own voice
419 // in loop back during this time. At the same time, delay recordings are 419 // in loop back during this time. At the same time, delay recordings are
420 // performed and stored in the output text file. 420 // performed and stored in the output text file.
421 message_loop()->PostDelayedTask(FROM_HERE, 421 message_loop()->PostDelayedTask(FROM_HERE,
422 base::MessageLoop::QuitClosure(), TestTimeouts::action_timeout()); 422 base::MessageLoop::QuitWhenIdleClosure(),
423 TestTimeouts::action_timeout());
423 message_loop()->Run(); 424 message_loop()->Run();
424 425
425 aos->Stop(); 426 aos->Stop();
426 ais->Stop(); 427 ais->Stop();
427 428
428 // All Close() operations that run on the mocked audio thread, 429 // All Close() operations that run on the mocked audio thread,
429 // should be synchronous and not post additional close tasks to 430 // should be synchronous and not post additional close tasks to
430 // mocked the audio thread. Hence, there is no need to call 431 // mocked the audio thread. Hence, there is no need to call
431 // message_loop()->RunUntilIdle() after the Close() methods. 432 // message_loop()->RunUntilIdle() after the Close() methods.
432 aos->Close(); 433 aos->Close();
433 ais->Close(); 434 ais->Close();
434 } 435 }
435 436
436 } // namespace media 437 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698