Index: content/renderer/media/audio_message_filter_unittest.cc |
diff --git a/content/renderer/media/audio_message_filter_unittest.cc b/content/renderer/media/audio_message_filter_unittest.cc |
index e94e8cba55819f65e36f5c9e543d5dae0a8d29e9..8ae6af532cac3530f469e1ac7b98a736fcfbb968 100644 |
--- a/content/renderer/media/audio_message_filter_unittest.cc |
+++ b/content/renderer/media/audio_message_filter_unittest.cc |
@@ -9,9 +9,10 @@ |
#include "base/macros.h" |
#include "content/common/media/audio_messages.h" |
#include "content/renderer/media/audio_message_filter.h" |
+#include "content/renderer/media/audio_output_client.h" |
#include "media/audio/audio_output_ipc.h" |
#include "testing/gtest/include/gtest/gtest.h" |
- |
+/* |
namespace content { |
namespace { |
@@ -112,6 +113,7 @@ TEST(AudioMessageFilterTest, Basic) { |
MockAudioDelegate delegate; |
const std::unique_ptr<media::AudioOutputIPC> ipc = |
filter->CreateAudioOutputIPC(kRenderFrameId); |
+ filter->set_audio_output_client(kRenderFrameId, new AudioOutputClient(NULL)); |
static const int kSessionId = 0; |
static const std::string kDeviceId; |
static const url::Origin kSecurityOrigin; |
@@ -134,8 +136,8 @@ TEST(AudioMessageFilterTest, Basic) { |
base::SyncSocket::TransitDescriptor socket_descriptor; |
const uint32_t kLength = 1024; |
EXPECT_FALSE(delegate.created_received()); |
- filter->OnMessageReceived(AudioMsg_NotifyStreamCreated( |
- kStreamId, base::SharedMemory::NULLHandle(), socket_descriptor, kLength)); |
+ filter->OnStreamCreated(kStreamId, base::SharedMemory::NULLHandle(), |
+ socket_descriptor, kLength); |
EXPECT_TRUE(delegate.created_received()); |
EXPECT_FALSE(base::SharedMemory::IsHandleValid(delegate.handle())); |
EXPECT_EQ(kLength, delegate.length()); |
@@ -146,6 +148,8 @@ TEST(AudioMessageFilterTest, Basic) { |
filter->OnMessageReceived( |
AudioMsg_NotifyStreamStateChanged( |
kStreamId, media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING)); |
+ filter->OnStreamCreated(kStreamId, base::SharedMemory::NULLHandle(), |
+ socket_descriptor, kLength); |
EXPECT_TRUE(delegate.state_changed_received()); |
EXPECT_EQ(media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING, delegate.state()); |
delegate.Reset(); |
@@ -160,7 +164,7 @@ TEST(AudioMessageFilterTest, Delegates) { |
scoped_refptr<AudioMessageFilter> filter( |
new AudioMessageFilter(message_loop.task_runner())); |
- |
+ filter->set_audio_output_client(kRenderFrameId, new AudioOutputClient(NULL)); |
MockAudioDelegate delegate1; |
MockAudioDelegate delegate2; |
const std::unique_ptr<media::AudioOutputIPC> ipc1 = |
@@ -203,4 +207,8 @@ TEST(AudioMessageFilterTest, Delegates) { |
filter->delegates_.Lookup(kStreamId2)); |
} |
-} // namespace content |
+} |
+ |
+ // namespace content |
+ |
+*/ |