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

Side by Side Diff: webrtc/pc/mediastream_unittest.cc

Issue 2979493003: Revert: Change VideoTrack implementation to invoke VideoTrackSourceInterface::AddOrUpdateSink on wt (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « webrtc/ortc/ortcfactory.cc ('k') | webrtc/pc/peerconnectionfactory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2011 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
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 private: 49 private:
50 NotifierInterface* notifier_; 50 NotifierInterface* notifier_;
51 }; 51 };
52 52
53 class MediaStreamTest: public testing::Test { 53 class MediaStreamTest: public testing::Test {
54 protected: 54 protected:
55 virtual void SetUp() { 55 virtual void SetUp() {
56 stream_ = MediaStream::Create(kStreamLabel1); 56 stream_ = MediaStream::Create(kStreamLabel1);
57 ASSERT_TRUE(stream_.get() != NULL); 57 ASSERT_TRUE(stream_.get() != NULL);
58 58
59 video_track_ = VideoTrack::Create( 59 video_track_ =
60 kVideoTrackId, FakeVideoTrackSource::Create(), rtc::Thread::Current()); 60 VideoTrack::Create(kVideoTrackId, FakeVideoTrackSource::Create());
61 ASSERT_TRUE(video_track_.get() != NULL); 61 ASSERT_TRUE(video_track_.get() != NULL);
62 EXPECT_EQ(MediaStreamTrackInterface::kLive, video_track_->state()); 62 EXPECT_EQ(MediaStreamTrackInterface::kLive, video_track_->state());
63 63
64 audio_track_ = AudioTrack::Create(kAudioTrackId, NULL); 64 audio_track_ = AudioTrack::Create(kAudioTrackId, NULL);
65 65
66 ASSERT_TRUE(audio_track_.get() != NULL); 66 ASSERT_TRUE(audio_track_.get() != NULL);
67 EXPECT_EQ(MediaStreamTrackInterface::kLive, audio_track_->state()); 67 EXPECT_EQ(MediaStreamTrackInterface::kLive, audio_track_->state());
68 68
69 EXPECT_TRUE(stream_->AddTrack(video_track_)); 69 EXPECT_TRUE(stream_->AddTrack(video_track_));
70 EXPECT_FALSE(stream_->AddTrack(video_track_)); 70 EXPECT_FALSE(stream_->AddTrack(video_track_));
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ChangeTrack(video_track.get()); 145 ChangeTrack(video_track.get());
146 } 146 }
147 147
148 TEST_F(MediaStreamTest, ChangeAudioTrack) { 148 TEST_F(MediaStreamTest, ChangeAudioTrack) {
149 scoped_refptr<webrtc::AudioTrackInterface> audio_track( 149 scoped_refptr<webrtc::AudioTrackInterface> audio_track(
150 stream_->GetAudioTracks()[0]); 150 stream_->GetAudioTracks()[0]);
151 ChangeTrack(audio_track.get()); 151 ChangeTrack(audio_track.get());
152 } 152 }
153 153
154 } // namespace webrtc 154 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/ortc/ortcfactory.cc ('k') | webrtc/pc/peerconnectionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698