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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 audio_processor = NULL; | 471 audio_processor = NULL; |
472 } | 472 } |
473 | 473 |
474 // Test that if we have an AEC dump message filter created, we are getting it | 474 // Test that if we have an AEC dump message filter created, we are getting it |
475 // correctly in MSAP. Any IPC messages will be deleted since no sender in the | 475 // correctly in MSAP. Any IPC messages will be deleted since no sender in the |
476 // filter will be created. | 476 // filter will be created. |
477 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { | 477 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { |
478 base::MessageLoopForUI message_loop; | 478 base::MessageLoopForUI message_loop; |
479 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( | 479 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( |
480 new AecDumpMessageFilter(message_loop.task_runner(), | 480 new AecDumpMessageFilter(message_loop.task_runner(), |
481 message_loop.task_runner(), nullptr)); | 481 message_loop.task_runner())); |
482 | 482 |
483 MockConstraintFactory constraint_factory; | 483 MockConstraintFactory constraint_factory; |
484 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( | 484 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( |
485 new WebRtcAudioDeviceImpl()); | 485 new WebRtcAudioDeviceImpl()); |
486 scoped_refptr<MediaStreamAudioProcessor> audio_processor( | 486 scoped_refptr<MediaStreamAudioProcessor> audio_processor( |
487 new rtc::RefCountedObject<MediaStreamAudioProcessor>( | 487 new rtc::RefCountedObject<MediaStreamAudioProcessor>( |
488 constraint_factory.CreateWebMediaConstraints(), input_device_params_, | 488 constraint_factory.CreateWebMediaConstraints(), input_device_params_, |
489 webrtc_audio_device.get())); | 489 webrtc_audio_device.get())); |
490 | 490 |
491 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); | 491 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 ProcessDataAndVerifyFormat(audio_processor.get(), | 579 ProcessDataAndVerifyFormat(audio_processor.get(), |
580 kAudioProcessingSampleRate, | 580 kAudioProcessingSampleRate, |
581 kAudioProcessingNumberOfChannel, | 581 kAudioProcessingNumberOfChannel, |
582 kAudioProcessingSampleRate / 100); | 582 kAudioProcessingSampleRate / 100); |
583 // Set |audio_processor| to NULL to make sure |webrtc_audio_device| outlives | 583 // Set |audio_processor| to NULL to make sure |webrtc_audio_device| outlives |
584 // |audio_processor|. | 584 // |audio_processor|. |
585 audio_processor = NULL; | 585 audio_processor = NULL; |
586 } | 586 } |
587 | 587 |
588 } // namespace content | 588 } // namespace content |
OLD | NEW |