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

Unified Diff: media/audio/win/audio_device_listener_win_unittest.cc

Issue 1130753005: Get audio_unittests passing with h/w on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: MTA -> STA Created 5 years, 7 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 | « media/audio/audio_manager_unittest.cc ('k') | media/audio/win/audio_low_latency_input_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_device_listener_win_unittest.cc
diff --git a/media/audio/win/audio_device_listener_win_unittest.cc b/media/audio/win/audio_device_listener_win_unittest.cc
index 49a13592766e95a39c600034dff626eeaa8d2abb..052b1bb8c396e8fee5cd8fe4fd1e7df3df554bd6 100644
--- a/media/audio/win/audio_device_listener_win_unittest.cc
+++ b/media/audio/win/audio_device_listener_win_unittest.cc
@@ -10,6 +10,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_com_initializer.h"
#include "media/audio/audio_manager.h"
+#include "media/audio/audio_unittest_util.h"
#include "media/audio/win/audio_device_listener_win.h"
#include "media/audio/win/core_audio_util_win.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -25,8 +26,8 @@ static const char kSecondTestDevice[] = "test_device_1";
class AudioDeviceListenerWinTest : public testing::Test {
public:
- AudioDeviceListenerWinTest()
- : com_init_(ScopedCOMInitializer::kMTA) {
+ AudioDeviceListenerWinTest() {
+ DCHECK(com_init_.succeeded());
}
virtual void SetUp() {
@@ -65,8 +66,7 @@ class AudioDeviceListenerWinTest : public testing::Test {
// Simulate a device change events and ensure we get the right callbacks.
TEST_F(AudioDeviceListenerWinTest, OutputDeviceChange) {
- if (!CoreAudioUtil::IsSupported())
- return;
+ ABORT_AUDIO_TEST_IF_NOT(CoreAudioUtil::IsSupported());
SetOutputDeviceId(kNoDevice);
EXPECT_CALL(*this, OnDeviceChange()).Times(1);
@@ -84,8 +84,7 @@ TEST_F(AudioDeviceListenerWinTest, OutputDeviceChange) {
// Ensure that null output device changes don't crash. Simulates the situation
// where we have no output devices.
TEST_F(AudioDeviceListenerWinTest, NullOutputDeviceChange) {
- if (!CoreAudioUtil::IsSupported())
- return;
+ ABORT_AUDIO_TEST_IF_NOT(CoreAudioUtil::IsSupported());
SetOutputDeviceId(kNoDevice);
EXPECT_CALL(*this, OnDeviceChange()).Times(0);
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/win/audio_low_latency_input_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698