OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/pc/localaudiosource.h" | 11 #include "webrtc/pc/localaudiosource.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "webrtc/api/test/fakeconstraints.h" | 16 #include "webrtc/api/test/fakeconstraints.h" |
17 #include "webrtc/base/gunit.h" | |
18 #include "webrtc/media/base/fakemediaengine.h" | 17 #include "webrtc/media/base/fakemediaengine.h" |
19 #include "webrtc/media/base/fakevideorenderer.h" | 18 #include "webrtc/media/base/fakevideorenderer.h" |
| 19 #include "webrtc/rtc_base/gunit.h" |
20 | 20 |
21 using webrtc::LocalAudioSource; | 21 using webrtc::LocalAudioSource; |
22 using webrtc::MediaConstraintsInterface; | 22 using webrtc::MediaConstraintsInterface; |
23 using webrtc::MediaSourceInterface; | 23 using webrtc::MediaSourceInterface; |
24 | 24 |
25 TEST(LocalAudioSourceTest, SetValidOptions) { | 25 TEST(LocalAudioSourceTest, SetValidOptions) { |
26 webrtc::FakeConstraints constraints; | 26 webrtc::FakeConstraints constraints; |
27 constraints.AddMandatory( | 27 constraints.AddMandatory( |
28 MediaConstraintsInterface::kGoogEchoCancellation, false); | 28 MediaConstraintsInterface::kGoogEchoCancellation, false); |
29 constraints.AddOptional( | 29 constraints.AddOptional( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 rtc::scoped_refptr<LocalAudioSource> source = | 97 rtc::scoped_refptr<LocalAudioSource> source = |
98 LocalAudioSource::Create(&audio_options); | 98 LocalAudioSource::Create(&audio_options); |
99 EXPECT_EQ(rtc::Optional<bool>(true), source->options().highpass_filter); | 99 EXPECT_EQ(rtc::Optional<bool>(true), source->options().highpass_filter); |
100 } | 100 } |
101 | 101 |
102 TEST(LocalAudioSourceTest, InitWithNoOptions) { | 102 TEST(LocalAudioSourceTest, InitWithNoOptions) { |
103 rtc::scoped_refptr<LocalAudioSource> source = | 103 rtc::scoped_refptr<LocalAudioSource> source = |
104 LocalAudioSource::Create((cricket::AudioOptions*)nullptr); | 104 LocalAudioSource::Create((cricket::AudioOptions*)nullptr); |
105 EXPECT_EQ(rtc::Optional<bool>(), source->options().highpass_filter); | 105 EXPECT_EQ(rtc::Optional<bool>(), source->options().highpass_filter); |
106 } | 106 } |
OLD | NEW |