OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 audio_processor = NULL; | 442 audio_processor = NULL; |
443 } | 443 } |
444 | 444 |
445 // Test that if we have an AEC dump message filter created, we are getting it | 445 // Test that if we have an AEC dump message filter created, we are getting it |
446 // correctly in MSAP. Any IPC messages will be deleted since no sender in the | 446 // correctly in MSAP. Any IPC messages will be deleted since no sender in the |
447 // filter will be created. | 447 // filter will be created. |
448 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { | 448 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { |
449 base::MessageLoopForUI message_loop; | 449 base::MessageLoopForUI message_loop; |
450 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( | 450 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( |
451 new AecDumpMessageFilter(message_loop.task_runner(), | 451 new AecDumpMessageFilter(message_loop.task_runner(), |
452 message_loop.task_runner(), nullptr)); | 452 message_loop.task_runner())); |
453 | 453 |
454 MockConstraintFactory constraint_factory; | 454 MockConstraintFactory constraint_factory; |
455 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( | 455 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( |
456 new WebRtcAudioDeviceImpl()); | 456 new WebRtcAudioDeviceImpl()); |
457 scoped_refptr<MediaStreamAudioProcessor> audio_processor( | 457 scoped_refptr<MediaStreamAudioProcessor> audio_processor( |
458 new rtc::RefCountedObject<MediaStreamAudioProcessor>( | 458 new rtc::RefCountedObject<MediaStreamAudioProcessor>( |
459 constraint_factory.CreateWebMediaConstraints(), input_device_params_, | 459 constraint_factory.CreateWebMediaConstraints(), input_device_params_, |
460 webrtc_audio_device.get())); | 460 webrtc_audio_device.get())); |
461 | 461 |
462 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); | 462 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 ProcessDataAndVerifyFormat(audio_processor.get(), | 550 ProcessDataAndVerifyFormat(audio_processor.get(), |
551 kAudioProcessingSampleRate, | 551 kAudioProcessingSampleRate, |
552 kAudioProcessingNumberOfChannel, | 552 kAudioProcessingNumberOfChannel, |
553 kAudioProcessingSampleRate / 100); | 553 kAudioProcessingSampleRate / 100); |
554 // Set |audio_processor| to NULL to make sure |webrtc_audio_device| outlives | 554 // Set |audio_processor| to NULL to make sure |webrtc_audio_device| outlives |
555 // |audio_processor|. | 555 // |audio_processor|. |
556 audio_processor = NULL; | 556 audio_processor = NULL; |
557 } | 557 } |
558 | 558 |
559 } // namespace content | 559 } // namespace content |
OLD | NEW |