OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/public/renderer/media_stream_audio_sink.h" | 10 #include "content/public/renderer/media_stream_audio_sink.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 class ProcessedLocalAudioSourceTest : public testing::Test { | 76 class ProcessedLocalAudioSourceTest : public testing::Test { |
77 protected: | 77 protected: |
78 ProcessedLocalAudioSourceTest() {} | 78 ProcessedLocalAudioSourceTest() {} |
79 | 79 |
80 ~ProcessedLocalAudioSourceTest() override {} | 80 ~ProcessedLocalAudioSourceTest() override {} |
81 | 81 |
82 void SetUp() override { | 82 void SetUp() override { |
83 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_label"), | 83 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_label"), |
84 blink::WebMediaStreamSource::TypeAudio, | 84 blink::WebMediaStreamSource::TypeAudio, |
85 blink::WebString::fromUTF8("audio_track"), | 85 blink::WebString::fromUTF8("audio_track")); |
86 false /* remote */); | |
87 blink_audio_track_.initialize(blink_audio_source_.id(), | 86 blink_audio_track_.initialize(blink_audio_source_.id(), |
88 blink_audio_source_); | 87 blink_audio_source_); |
89 } | 88 } |
90 | 89 |
91 void TearDown() override { | 90 void TearDown() override { |
92 blink_audio_track_.reset(); | 91 blink_audio_track_.reset(); |
93 blink_audio_source_.reset(); | 92 blink_audio_source_.reset(); |
94 blink::WebHeap::collectAllGarbageForTesting(); | 93 blink::WebHeap::collectAllGarbageForTesting(); |
95 } | 94 } |
96 | 95 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Even though ConnectToTrack() failed, there should still have been a new | 219 // Even though ConnectToTrack() failed, there should still have been a new |
221 // MediaStreamAudioTrack instance created, owned by the | 220 // MediaStreamAudioTrack instance created, owned by the |
222 // blink::WebMediaStreamTrack. | 221 // blink::WebMediaStreamTrack. |
223 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); | 222 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); |
224 } | 223 } |
225 | 224 |
226 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around | 225 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around |
227 // constraints processing and validation that should have unit testing. | 226 // constraints processing and validation that should have unit testing. |
228 | 227 |
229 } // namespace content | 228 } // namespace content |
OLD | NEW |