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 "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 class ProcessedLocalAudioSourceTest : public testing::Test { | 77 class ProcessedLocalAudioSourceTest : public testing::Test { |
78 protected: | 78 protected: |
79 ProcessedLocalAudioSourceTest() {} | 79 ProcessedLocalAudioSourceTest() {} |
80 | 80 |
81 ~ProcessedLocalAudioSourceTest() override {} | 81 ~ProcessedLocalAudioSourceTest() override {} |
82 | 82 |
83 void SetUp() override { | 83 void SetUp() override { |
84 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_label"), | 84 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_label"), |
85 blink::WebMediaStreamSource::TypeAudio, | 85 blink::WebMediaStreamSource::TypeAudio, |
86 blink::WebString::fromUTF8("audio_track"), | 86 blink::WebString::fromUTF8("audio_track")); |
87 false /* remote */); | |
88 blink_audio_track_.initialize(blink_audio_source_.id(), | 87 blink_audio_track_.initialize(blink_audio_source_.id(), |
89 blink_audio_source_); | 88 blink_audio_source_); |
90 } | 89 } |
91 | 90 |
92 void TearDown() override { | 91 void TearDown() override { |
93 blink_audio_track_.reset(); | 92 blink_audio_track_.reset(); |
94 blink_audio_source_.reset(); | 93 blink_audio_source_.reset(); |
95 blink::WebHeap::collectAllGarbageForTesting(); | 94 blink::WebHeap::collectAllGarbageForTesting(); |
96 } | 95 } |
97 | 96 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // Even though ConnectToTrack() failed, there should still have been a new | 230 // Even though ConnectToTrack() failed, there should still have been a new |
232 // MediaStreamAudioTrack instance created, owned by the | 231 // MediaStreamAudioTrack instance created, owned by the |
233 // blink::WebMediaStreamTrack. | 232 // blink::WebMediaStreamTrack. |
234 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); | 233 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); |
235 } | 234 } |
236 | 235 |
237 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around | 236 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around |
238 // constraints processing and validation that should have unit testing. | 237 // constraints processing and validation that should have unit testing. |
239 | 238 |
240 } // namespace content | 239 } // namespace content |
OLD | NEW |