| 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 */); |
| 87 blink_audio_track_.initialize(blink_audio_source_.id(), | 88 blink_audio_track_.initialize(blink_audio_source_.id(), |
| 88 blink_audio_source_); | 89 blink_audio_source_); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void TearDown() override { | 92 void TearDown() override { |
| 92 blink_audio_track_.reset(); | 93 blink_audio_track_.reset(); |
| 93 blink_audio_source_.reset(); | 94 blink_audio_source_.reset(); |
| 94 blink::WebHeap::collectAllGarbageForTesting(); | 95 blink::WebHeap::collectAllGarbageForTesting(); |
| 95 } | 96 } |
| 96 | 97 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // Even though ConnectToTrack() failed, there should still have been a new | 231 // Even though ConnectToTrack() failed, there should still have been a new |
| 231 // MediaStreamAudioTrack instance created, owned by the | 232 // MediaStreamAudioTrack instance created, owned by the |
| 232 // blink::WebMediaStreamTrack. | 233 // blink::WebMediaStreamTrack. |
| 233 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); | 234 EXPECT_TRUE(MediaStreamAudioTrack::From(blink_audio_track())); |
| 234 } | 235 } |
| 235 | 236 |
| 236 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around | 237 // TODO(miu): There's a lot of logic in ProcessedLocalAudioSource around |
| 237 // constraints processing and validation that should have unit testing. | 238 // constraints processing and validation that should have unit testing. |
| 238 | 239 |
| 239 } // namespace content | 240 } // namespace content |
| OLD | NEW |