| Index: content/renderer/media/media_stream_dispatcher_unittest.cc
|
| diff --git a/content/renderer/media/media_stream_dispatcher_unittest.cc b/content/renderer/media/media_stream_dispatcher_unittest.cc
|
| index 32acc8825446f4ceecbf5d4b7d29cd162da43a0b..eb68780b232fd2737284185548cfc96886c3ed8a 100644
|
| --- a/content/renderer/media/media_stream_dispatcher_unittest.cc
|
| +++ b/content/renderer/media/media_stream_dispatcher_unittest.cc
|
| @@ -405,66 +405,4 @@ TEST_F(MediaStreamDispatcherTest, DeviceClosed) {
|
| StreamDeviceInfo::kNoId);
|
| }
|
|
|
| -TEST_F(MediaStreamDispatcherTest, CheckDuckingState) {
|
| - scoped_ptr<MediaStreamDispatcher> dispatcher(new MediaStreamDispatcher(NULL));
|
| - scoped_ptr<MockMediaStreamDispatcherEventHandler>
|
| - handler(new MockMediaStreamDispatcherEventHandler);
|
| - StreamOptions components(true, false); // audio only.
|
| - int ipc_request_id1 = dispatcher->next_ipc_id_;
|
| -
|
| - dispatcher->GenerateStream(kRequestId1, handler.get()->AsWeakPtr(),
|
| - components, GURL());
|
| - EXPECT_EQ(1u, dispatcher->requests_.size());
|
| -
|
| - // Ducking isn't active at this point.
|
| - EXPECT_FALSE(dispatcher->IsAudioDuckingActive());
|
| -
|
| - // Complete the creation of stream1 with a single audio track that has
|
| - // ducking enabled.
|
| - StreamDeviceInfoArray audio_device_array(1);
|
| - StreamDeviceInfo& audio_device_info = audio_device_array[0];
|
| - audio_device_info.device.name = "Microphone";
|
| - audio_device_info.device.type = kAudioType;
|
| - audio_device_info.session_id = kAudioSessionId;
|
| - audio_device_info.device.input.effects = media::AudioParameters::DUCKING;
|
| -
|
| - StreamDeviceInfoArray video_device_array; // Empty for this test.
|
| -
|
| - const char kStreamLabel[] = "stream1";
|
| - dispatcher->OnMessageReceived(MediaStreamMsg_StreamGenerated(
|
| - kRouteId, ipc_request_id1, kStreamLabel,
|
| - audio_device_array, video_device_array));
|
| - EXPECT_EQ(handler->request_id_, kRequestId1);
|
| - EXPECT_EQ(0u, dispatcher->requests_.size());
|
| -
|
| - // Ducking should now be reported as active.
|
| - EXPECT_TRUE(dispatcher->IsAudioDuckingActive());
|
| -
|
| - // Stop the device (removes the stream).
|
| - dispatcher->OnMessageReceived(
|
| - MediaStreamMsg_DeviceStopped(kRouteId, kStreamLabel,
|
| - handler->audio_device_));
|
| -
|
| - // Ducking should now be reported as inactive again.
|
| - EXPECT_FALSE(dispatcher->IsAudioDuckingActive());
|
| -
|
| - // Now do the same sort of test with the DUCKING flag off.
|
| - audio_device_info.device.input.effects =
|
| - media::AudioParameters::ECHO_CANCELLER;
|
| -
|
| - dispatcher->OnMessageReceived(MediaStreamMsg_StreamGenerated(
|
| - kRouteId, ipc_request_id1, kStreamLabel,
|
| - audio_device_array, video_device_array));
|
| - EXPECT_EQ(handler->request_id_, kRequestId1);
|
| - EXPECT_EQ(0u, dispatcher->requests_.size());
|
| -
|
| - // Ducking should still be reported as not active.
|
| - EXPECT_FALSE(dispatcher->IsAudioDuckingActive());
|
| -
|
| - // Stop the device (removes the stream).
|
| - dispatcher->OnMessageReceived(
|
| - MediaStreamMsg_DeviceStopped(kRouteId, kStreamLabel,
|
| - handler->audio_device_));
|
| -}
|
| -
|
| } // namespace content
|
|
|