Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: content/renderer/media/media_stream_audio_unittest.cc

Issue 2767963002: Revert of Remove |remote| and |readonly| members of MediaStreamTrack. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 DISALLOW_COPY_AND_ASSIGN(FakeMediaStreamAudioSink); 236 DISALLOW_COPY_AND_ASSIGN(FakeMediaStreamAudioSink);
237 }; 237 };
238 238
239 } // namespace 239 } // namespace
240 240
241 class MediaStreamAudioTest : public ::testing::Test { 241 class MediaStreamAudioTest : public ::testing::Test {
242 protected: 242 protected:
243 void SetUp() override { 243 void SetUp() override {
244 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_id"), 244 blink_audio_source_.initialize(blink::WebString::fromUTF8("audio_id"),
245 blink::WebMediaStreamSource::TypeAudio, 245 blink::WebMediaStreamSource::TypeAudio,
246 blink::WebString::fromUTF8("audio_track")); 246 blink::WebString::fromUTF8("audio_track"),
247 false /* remote */);
247 blink_audio_track_.initialize(blink_audio_source_.id(), 248 blink_audio_track_.initialize(blink_audio_source_.id(),
248 blink_audio_source_); 249 blink_audio_source_);
249 } 250 }
250 251
251 void TearDown() override { 252 void TearDown() override {
252 blink_audio_track_.reset(); 253 blink_audio_track_.reset();
253 blink_audio_source_.reset(); 254 blink_audio_source_.reset();
254 blink::WebHeap::collectAllGarbageForTesting(); 255 blink::WebHeap::collectAllGarbageForTesting();
255 } 256 }
256 257
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // enabled state of the second track and sink. They should still be disabled, 447 // enabled state of the second track and sink. They should still be disabled,
447 // with silent audio being consumed at the sink. 448 // with silent audio being consumed at the sink.
448 EXPECT_EQ(FakeMediaStreamAudioSink::WAS_DISABLED, sink.enable_state()); 449 EXPECT_EQ(FakeMediaStreamAudioSink::WAS_DISABLED, sink.enable_state());
449 EXPECT_TRUE(sink.is_audio_silent()); 450 EXPECT_TRUE(sink.is_audio_silent());
450 451
451 MediaStreamAudioTrack::From(another_blink_track)->RemoveSink(&another_sink); 452 MediaStreamAudioTrack::From(another_blink_track)->RemoveSink(&another_sink);
452 track()->RemoveSink(&sink); 453 track()->RemoveSink(&sink);
453 } 454 }
454 455
455 } // namespace content 456 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698