OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <CoreAudio/AudioHardware.h> | 5 #include <CoreAudio/AudioHardware.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
11 #include "media/audio/mac/audio_device_listener_mac.h" | 12 #include "media/audio/mac/audio_device_listener_mac.h" |
12 #include "media/base/bind_to_current_loop.h" | 13 #include "media/base/bind_to_current_loop.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 | 18 |
18 class AudioDeviceListenerMacTest : public testing::Test { | 19 class AudioDeviceListenerMacTest : public testing::Test { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 78 |
78 // Simulate a device change events and ensure we get the right callbacks. | 79 // Simulate a device change events and ensure we get the right callbacks. |
79 TEST_F(AudioDeviceListenerMacTest, OutputDeviceChange) { | 80 TEST_F(AudioDeviceListenerMacTest, OutputDeviceChange) { |
80 ASSERT_TRUE(ListenerIsValid()); | 81 ASSERT_TRUE(ListenerIsValid()); |
81 EXPECT_CALL(*this, OnDeviceChange()).Times(1); | 82 EXPECT_CALL(*this, OnDeviceChange()).Times(1); |
82 ASSERT_TRUE(SimulateDefaultOutputDeviceChange()); | 83 ASSERT_TRUE(SimulateDefaultOutputDeviceChange()); |
83 message_loop_.RunUntilIdle(); | 84 message_loop_.RunUntilIdle(); |
84 } | 85 } |
85 | 86 |
86 } // namespace media | 87 } // namespace media |
OLD | NEW |