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

Unified Diff: media/audio/mac/audio_output_mac_unittest.cc

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 years 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 | « media/audio/mac/audio_manager_mac.cc ('k') | media/audio/openbsd/audio_manager_openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_output_mac_unittest.cc
===================================================================
--- media/audio/mac/audio_output_mac_unittest.cc (revision 114012)
+++ media/audio/mac/audio_output_mac_unittest.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "media/audio/simple_sources.h"
@@ -47,13 +48,12 @@
// ===========================================================================
// Validation of AudioParameters::AUDIO_PCM_LINEAR
//
-// Unlike windows, the tests can reliably detect the existense of real
+// Unlike windows, the tests can reliably detect the existence of real
// audio devices on the bots thus no need for 'headless' detection.
// Test that can it be created and closed.
TEST(MacAudioTest, PCMWaveStreamGetAndClose) {
- AudioManager* audio_man = AudioManager::GetAudioManager();
- ASSERT_TRUE(NULL != audio_man);
+ scoped_refptr<AudioManager> audio_man(AudioManager::Create());
if (!audio_man->HasAudioOutputDevices())
return;
AudioOutputStream* oas = audio_man->MakeAudioOutputStream(
@@ -65,8 +65,7 @@
// Test that it can be opened and closed.
TEST(MacAudioTest, PCMWaveStreamOpenAndClose) {
- AudioManager* audio_man = AudioManager::GetAudioManager();
- ASSERT_TRUE(NULL != audio_man);
+ scoped_refptr<AudioManager> audio_man(AudioManager::Create());
if (!audio_man->HasAudioOutputDevices())
return;
AudioOutputStream* oas = audio_man->MakeAudioOutputStream(
@@ -82,8 +81,7 @@
// pops or noises while the sound is playing. The sound must also be identical
// to the sound of PCMWaveStreamPlay200HzTone22KssMono test.
TEST(MacAudioTest, PCMWaveStreamPlay200HzTone44KssMono) {
- AudioManager* audio_man = AudioManager::GetAudioManager();
- ASSERT_TRUE(NULL != audio_man);
+ scoped_refptr<AudioManager> audio_man(AudioManager::Create());
if (!audio_man->HasAudioOutputDevices())
return;
uint32 frames_100_ms = AudioParameters::kAudioCDSampleRate / 10;
@@ -113,8 +111,7 @@
// or noises while the sound is playing. The sound must also be identical to the
// sound of PCMWaveStreamPlay200HzTone44KssMono test.
TEST(MacAudioTest, PCMWaveStreamPlay200HzTone22KssMono) {
- AudioManager* audio_man = AudioManager::GetAudioManager();
- ASSERT_TRUE(NULL != audio_man);
+ scoped_refptr<AudioManager> audio_man(AudioManager::Create());
if (!audio_man->HasAudioOutputDevices())
return;
uint32 frames_100_ms = AudioParameters::kAudioCDSampleRate / 10;
@@ -140,8 +137,7 @@
}
TEST(MacAudioTest, PCMWaveStreamPendingBytes) {
- AudioManager* audio_man = AudioManager::GetAudioManager();
- ASSERT_TRUE(NULL != audio_man);
+ scoped_refptr<AudioManager> audio_man(AudioManager::Create());
if (!audio_man->HasAudioOutputDevices())
return;
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | media/audio/openbsd/audio_manager_openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698