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

Side by Side Diff: media/audio/android/audio_android_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 | « no previous file | media/audio/audio_input_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/build_info.h" 5 #include "base/android/build_info.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 21 matching lines...) Expand all
32 using ::testing::DoAll; 32 using ::testing::DoAll;
33 using ::testing::Invoke; 33 using ::testing::Invoke;
34 using ::testing::NotNull; 34 using ::testing::NotNull;
35 using ::testing::Return; 35 using ::testing::Return;
36 36
37 namespace media { 37 namespace media {
38 namespace { 38 namespace {
39 39
40 ACTION_P3(CheckCountAndPostQuitTask, count, limit, loop) { 40 ACTION_P3(CheckCountAndPostQuitTask, count, limit, loop) {
41 if (++*count >= limit) { 41 if (++*count >= limit) {
42 loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 42 loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
43 } 43 }
44 } 44 }
45 45
46 const char kSpeechFile_16b_s_48k[] = "speech_16b_stereo_48kHz.raw"; 46 const char kSpeechFile_16b_s_48k[] = "speech_16b_stereo_48kHz.raw";
47 const char kSpeechFile_16b_m_48k[] = "speech_16b_mono_48kHz.raw"; 47 const char kSpeechFile_16b_m_48k[] = "speech_16b_mono_48kHz.raw";
48 const char kSpeechFile_16b_s_44k[] = "speech_16b_stereo_44kHz.raw"; 48 const char kSpeechFile_16b_s_44k[] = "speech_16b_stereo_44kHz.raw";
49 const char kSpeechFile_16b_m_44k[] = "speech_16b_mono_44kHz.raw"; 49 const char kSpeechFile_16b_m_44k[] = "speech_16b_mono_44kHz.raw";
50 50
51 const float kCallbackTestTimeMs = 2000.0; 51 const float kCallbackTestTimeMs = 2000.0;
52 const int kBitsPerSample = 16; 52 const int kBitsPerSample = 16;
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); 946 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20));
947 printf("\n"); 947 printf("\n");
948 StopAndCloseAudioOutputStreamOnAudioThread(); 948 StopAndCloseAudioOutputStreamOnAudioThread();
949 StopAndCloseAudioInputStreamOnAudioThread(); 949 StopAndCloseAudioInputStreamOnAudioThread();
950 } 950 }
951 951
952 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest, 952 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest,
953 testing::ValuesIn(RunAudioRecordInputPathTests())); 953 testing::ValuesIn(RunAudioRecordInputPathTests()));
954 954
955 } // namespace media 955 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_input_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698