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

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

Issue 1373443003: Modifies invalid DCHECK in AudioRecordJni::OnCacheDirectBufferAddress() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nit 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 | webrtc/modules/audio_device/android/audio_record_jni.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 /* 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 824
825 // Tests that playout can be initiated, started and stopped. No audio callback 825 // Tests that playout can be initiated, started and stopped. No audio callback
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 // Tests that recording can be initiated, started and stopped. No audio callback
835 // is registered in this test.
836 TEST_F(AudioDeviceTest, StartStopRecording) {
837 StartRecording();
838 StopRecording();
839 StartRecording();
840 StopRecording();
841 }
842
834 // Verify that calling StopPlayout() will leave us in an uninitialized state 843 // 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 844 // which will require a new call to InitPlayout(). This test does not call
836 // StartPlayout() while being uninitialized since doing so will hit a 845 // StartPlayout() while being uninitialized since doing so will hit a
837 // RTC_DCHECK. 846 // RTC_DCHECK.
838 TEST_F(AudioDeviceTest, StopPlayoutRequiresInitToRestart) { 847 TEST_F(AudioDeviceTest, StopPlayoutRequiresInitToRestart) {
839 EXPECT_EQ(0, audio_device()->InitPlayout()); 848 EXPECT_EQ(0, audio_device()->InitPlayout());
840 EXPECT_EQ(0, audio_device()->StartPlayout()); 849 EXPECT_EQ(0, audio_device()->StartPlayout());
841 EXPECT_EQ(0, audio_device()->StopPlayout()); 850 EXPECT_EQ(0, audio_device()->StopPlayout());
842 EXPECT_FALSE(audio_device()->PlayoutIsInitialized()); 851 EXPECT_FALSE(audio_device()->PlayoutIsInitialized());
843 } 852 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 StopPlayout(); 1007 StopPlayout();
999 StopRecording(); 1008 StopRecording();
1000 // Verify that the correct number of transmitted impulses are detected. 1009 // Verify that the correct number of transmitted impulses are detected.
1001 EXPECT_EQ(latency_audio_stream->num_latency_values(), 1010 EXPECT_EQ(latency_audio_stream->num_latency_values(),
1002 static_cast<size_t>( 1011 static_cast<size_t>(
1003 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 1012 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
1004 latency_audio_stream->PrintResults(); 1013 latency_audio_stream->PrintResults();
1005 } 1014 }
1006 1015
1007 } // namespace webrtc 1016 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/android/audio_record_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698