OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 }; | 176 }; |
177 | 177 |
178 TEST_P(AudioEncoderTest, EncodeOpus) { | 178 TEST_P(AudioEncoderTest, EncodeOpus) { |
179 RunTestForCodec(CODEC_AUDIO_OPUS); | 179 RunTestForCodec(CODEC_AUDIO_OPUS); |
180 } | 180 } |
181 | 181 |
182 TEST_P(AudioEncoderTest, EncodePcm16) { | 182 TEST_P(AudioEncoderTest, EncodePcm16) { |
183 RunTestForCodec(CODEC_AUDIO_PCM16); | 183 RunTestForCodec(CODEC_AUDIO_PCM16); |
184 } | 184 } |
185 | 185 |
| 186 #if defined(OS_MACOSX) |
| 187 TEST_P(AudioEncoderTest, EncodeAac) { |
| 188 RunTestForCodec(CODEC_AUDIO_AAC); |
| 189 } |
| 190 #endif |
| 191 |
186 static const int64 kOneCall_3Millis[] = {3}; | 192 static const int64 kOneCall_3Millis[] = {3}; |
187 static const int64 kOneCall_10Millis[] = {10}; | 193 static const int64 kOneCall_10Millis[] = {10}; |
188 static const int64 kOneCall_13Millis[] = {13}; | 194 static const int64 kOneCall_13Millis[] = {13}; |
189 static const int64 kOneCall_20Millis[] = {20}; | 195 static const int64 kOneCall_20Millis[] = {20}; |
190 | 196 |
191 static const int64 kTwoCalls_3Millis[] = {3, 3}; | 197 static const int64 kTwoCalls_3Millis[] = {3, 3}; |
192 static const int64 kTwoCalls_10Millis[] = {10, 10}; | 198 static const int64 kTwoCalls_10Millis[] = {10, 10}; |
193 static const int64 kTwoCalls_Mixed1[] = {3, 10}; | 199 static const int64 kTwoCalls_Mixed1[] = {3, 10}; |
194 static const int64 kTwoCalls_Mixed2[] = {10, 3}; | 200 static const int64 kTwoCalls_Mixed2[] = {10, 3}; |
195 static const int64 kTwoCalls_Mixed3[] = {3, 17}; | 201 static const int64 kTwoCalls_Mixed3[] = {3, 17}; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)), | 242 TestScenario(kManyCalls_Mixed2, arraysize(kManyCalls_Mixed2)), |
237 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)), | 243 TestScenario(kManyCalls_Mixed3, arraysize(kManyCalls_Mixed3)), |
238 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)), | 244 TestScenario(kManyCalls_Mixed4, arraysize(kManyCalls_Mixed4)), |
239 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)), | 245 TestScenario(kManyCalls_Mixed5, arraysize(kManyCalls_Mixed5)), |
240 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)), | 246 TestScenario(kOneBigUnderrun, arraysize(kOneBigUnderrun)), |
241 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)), | 247 TestScenario(kTwoBigUnderruns, arraysize(kTwoBigUnderruns)), |
242 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns)))); | 248 TestScenario(kMixedUnderruns, arraysize(kMixedUnderruns)))); |
243 | 249 |
244 } // namespace cast | 250 } // namespace cast |
245 } // namespace media | 251 } // namespace media |
OLD | NEW |