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

Unified Diff: media/audio/audio_output_proxy_unittest.cc

Issue 13390010: Fix a couple bugs with OSX audio buffer size selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittests. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_proxy_unittest.cc
diff --git a/media/audio/audio_output_proxy_unittest.cc b/media/audio/audio_output_proxy_unittest.cc
index cb20bd0ffdde6eaebcf1fc790e0bf8c95b4fbd74..224bbf5a1db63a0d2d7634430b96613b4239049f 100644
--- a/media/audio/audio_output_proxy_unittest.cc
+++ b/media/audio/audio_output_proxy_unittest.cc
@@ -628,8 +628,15 @@ TEST_F(AudioOutputResamplerTest, LowLatencyOpenFailedFallback) {
TEST_F(AudioOutputResamplerTest, HighLatencyFallbackFailed) {
MockAudioOutputStream okay_stream(&manager_, params_);
+// Only Windows has a high latency output driver that is not the same as the low
+// latency path.
+#if defined(OS_WIN)
+ static const int kFallbackCount = 2;
+#else
+ static const int kFallbackCount = 1;
+#endif
EXPECT_CALL(manager(), MakeAudioOutputStream(_))
- .Times(2)
+ .Times(kFallbackCount)
.WillRepeatedly(Return(static_cast<AudioOutputStream*>(NULL)));
// To prevent shared memory issues the sample rate and buffer size should
@@ -656,8 +663,15 @@ TEST_F(AudioOutputResamplerTest, HighLatencyFallbackFailed) {
// stream, and the fake audio output stream and ensure AudioOutputResampler
// terminates normally.
TEST_F(AudioOutputResamplerTest, AllFallbackFailed) {
+// Only Windows has a high latency output driver that is not the same as the low
+// latency path.
+#if defined(OS_WIN)
+ static const int kFallbackCount = 3;
+#else
+ static const int kFallbackCount = 2;
+#endif
EXPECT_CALL(manager(), MakeAudioOutputStream(_))
- .Times(3)
+ .Times(kFallbackCount)
.WillRepeatedly(Return(static_cast<AudioOutputStream*>(NULL)));
AudioOutputProxy* proxy = new AudioOutputProxy(resampler_);
« no previous file with comments | « no previous file | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698