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

Side by Side Diff: webrtc/modules/audio_device/android/audio_device_unittest.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // is registered in this test. 826 // is registered in this test.
827 TEST_F(AudioDeviceTest, StartStopPlayout) { 827 TEST_F(AudioDeviceTest, StartStopPlayout) {
828 StartPlayout(); 828 StartPlayout();
829 StopPlayout(); 829 StopPlayout();
830 StartPlayout(); 830 StartPlayout();
831 StopPlayout(); 831 StopPlayout();
832 } 832 }
833 833
834 // Verify that calling StopPlayout() will leave us in an uninitialized state 834 // Verify that calling StopPlayout() will leave us in an uninitialized state
835 // which will require a new call to InitPlayout(). This test does not call 835 // which will require a new call to InitPlayout(). This test does not call
836 // StartPlayout() while being uninitialized since doing so will hit a DCHECK. 836 // StartPlayout() while being uninitialized since doing so will hit a
837 // RTC_DCHECK.
837 TEST_F(AudioDeviceTest, StopPlayoutRequiresInitToRestart) { 838 TEST_F(AudioDeviceTest, StopPlayoutRequiresInitToRestart) {
838 EXPECT_EQ(0, audio_device()->InitPlayout()); 839 EXPECT_EQ(0, audio_device()->InitPlayout());
839 EXPECT_EQ(0, audio_device()->StartPlayout()); 840 EXPECT_EQ(0, audio_device()->StartPlayout());
840 EXPECT_EQ(0, audio_device()->StopPlayout()); 841 EXPECT_EQ(0, audio_device()->StopPlayout());
841 EXPECT_FALSE(audio_device()->PlayoutIsInitialized()); 842 EXPECT_FALSE(audio_device()->PlayoutIsInitialized());
842 } 843 }
843 844
844 // Start playout and verify that the native audio layer starts asking for real 845 // Start playout and verify that the native audio layer starts asking for real
845 // audio samples to play out using the NeedMorePlayData callback. 846 // audio samples to play out using the NeedMorePlayData callback.
846 TEST_F(AudioDeviceTest, StartPlayoutVerifyCallbacks) { 847 TEST_F(AudioDeviceTest, StartPlayoutVerifyCallbacks) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 StopPlayout(); 998 StopPlayout();
998 StopRecording(); 999 StopRecording();
999 // Verify that the correct number of transmitted impulses are detected. 1000 // Verify that the correct number of transmitted impulses are detected.
1000 EXPECT_EQ(latency_audio_stream->num_latency_values(), 1001 EXPECT_EQ(latency_audio_stream->num_latency_values(),
1001 static_cast<size_t>( 1002 static_cast<size_t>(
1002 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 1003 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
1003 latency_audio_stream->PrintResults(); 1004 latency_audio_stream->PrintResults();
1004 } 1005 }
1005 1006
1006 } // namespace webrtc 1007 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/android/audio_device_template.h ('k') | webrtc/modules/audio_device/android/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698