OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "webrtc/base/scoped_ptr.h" | 12 #include "webrtc/base/scoped_ptr.h" |
13 #include "webrtc/common_types.h" | 13 #include "webrtc/common_types.h" |
14 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" | 14 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" |
15 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 15 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
16 #include "webrtc/modules/audio_coding/test/utility.h" | 16 #include "webrtc/modules/audio_coding/test/utility.h" |
17 #include "webrtc/modules/include/module_common_types.h" | 17 #include "webrtc/modules/include/module_common_types.h" |
18 #include "webrtc/system_wrappers/include/sleep.h" | 18 #include "webrtc/system_wrappers/include/sleep.h" |
19 #include "webrtc/test/testsupport/fileutils.h" | 19 #include "webrtc/test/testsupport/fileutils.h" |
20 #include "webrtc/test/testsupport/gtest_disable.h" | |
21 | 20 |
22 namespace webrtc { | 21 namespace webrtc { |
23 | 22 |
24 class TargetDelayTest : public ::testing::Test { | 23 class TargetDelayTest : public ::testing::Test { |
25 protected: | 24 protected: |
26 TargetDelayTest() : acm_(AudioCodingModule::Create(0)) {} | 25 TargetDelayTest() : acm_(AudioCodingModule::Create(0)) {} |
27 | 26 |
28 ~TargetDelayTest() {} | 27 ~TargetDelayTest() {} |
29 | 28 |
30 void SetUp() { | 29 void SetUp() { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 191 |
193 int RequiredDelay() { | 192 int RequiredDelay() { |
194 return acm_->LeastRequiredDelayMs(); | 193 return acm_->LeastRequiredDelayMs(); |
195 } | 194 } |
196 | 195 |
197 rtc::scoped_ptr<AudioCodingModule> acm_; | 196 rtc::scoped_ptr<AudioCodingModule> acm_; |
198 WebRtcRTPHeader rtp_info_; | 197 WebRtcRTPHeader rtp_info_; |
199 uint8_t payload_[kPayloadLenBytes]; | 198 uint8_t payload_[kPayloadLenBytes]; |
200 }; | 199 }; |
201 | 200 |
202 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(OutOfRangeInput)) { | 201 #if defined(WEBRTC_ANDROID) |
| 202 #define MAYBE_OutOfRangeInput DISABLED_OutOfRangeInput |
| 203 #else |
| 204 #define MAYBE_OutOfRangeInput OutOfRangeInput |
| 205 #endif |
| 206 TEST_F(TargetDelayTest, MAYBE_OutOfRangeInput) { |
203 OutOfRangeInput(); | 207 OutOfRangeInput(); |
204 } | 208 } |
205 | 209 |
206 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(NoTargetDelayBufferSizeChanges)) { | 210 #if defined(WEBRTC_ANDROID) |
| 211 #define MAYBE_NoTargetDelayBufferSizeChanges \ |
| 212 DISABLED_NoTargetDelayBufferSizeChanges |
| 213 #else |
| 214 #define MAYBE_NoTargetDelayBufferSizeChanges NoTargetDelayBufferSizeChanges |
| 215 #endif |
| 216 TEST_F(TargetDelayTest, MAYBE_NoTargetDelayBufferSizeChanges) { |
207 NoTargetDelayBufferSizeChanges(); | 217 NoTargetDelayBufferSizeChanges(); |
208 } | 218 } |
209 | 219 |
210 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(WithTargetDelayBufferNotChanging)) { | 220 #if defined(WEBRTC_ANDROID) |
| 221 #define MAYBE_WithTargetDelayBufferNotChanging \ |
| 222 DISABLED_WithTargetDelayBufferNotChanging |
| 223 #else |
| 224 #define MAYBE_WithTargetDelayBufferNotChanging WithTargetDelayBufferNotChanging |
| 225 #endif |
| 226 TEST_F(TargetDelayTest, MAYBE_WithTargetDelayBufferNotChanging) { |
211 WithTargetDelayBufferNotChanging(); | 227 WithTargetDelayBufferNotChanging(); |
212 } | 228 } |
213 | 229 |
214 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(RequiredDelayAtCorrectRange)) { | 230 #if defined(WEBRTC_ANDROID) |
| 231 #define MAYBE_RequiredDelayAtCorrectRange DISABLED_RequiredDelayAtCorrectRange |
| 232 #else |
| 233 #define MAYBE_RequiredDelayAtCorrectRange RequiredDelayAtCorrectRange |
| 234 #endif |
| 235 TEST_F(TargetDelayTest, MAYBE_RequiredDelayAtCorrectRange) { |
215 RequiredDelayAtCorrectRange(); | 236 RequiredDelayAtCorrectRange(); |
216 } | 237 } |
217 | 238 |
218 TEST_F(TargetDelayTest, DISABLED_ON_ANDROID(TargetDelayBufferMinMax)) { | 239 #if defined(WEBRTC_ANDROID) |
| 240 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax |
| 241 #else |
| 242 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax |
| 243 #endif |
| 244 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { |
219 TargetDelayBufferMinMax(); | 245 TargetDelayBufferMinMax(); |
220 } | 246 } |
221 | 247 |
222 } // namespace webrtc | 248 } // namespace webrtc |
223 | 249 |
OLD | NEW |