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

Side by Side Diff: content/renderer/media/webrtc/media_stream_remote_video_source_unittest.cc

Issue 1603463007: Delete no-longer used pixel_width and pixel_height arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | remoting/protocol/webrtc_video_capturer_adapter.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/media/webrtc/media_stream_remote_video_source.h" 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 scoped_ptr<MediaStreamVideoTrack> track(CreateTrack()); 123 scoped_ptr<MediaStreamVideoTrack> track(CreateTrack());
124 EXPECT_EQ(1, NumberOfSuccessConstraintsCallbacks()); 124 EXPECT_EQ(1, NumberOfSuccessConstraintsCallbacks());
125 125
126 MockMediaStreamVideoSink sink; 126 MockMediaStreamVideoSink sink;
127 track->AddSink(&sink, sink.GetDeliverFrameCB()); 127 track->AddSink(&sink, sink.GetDeliverFrameCB());
128 base::RunLoop run_loop; 128 base::RunLoop run_loop;
129 base::Closure quit_closure = run_loop.QuitClosure(); 129 base::Closure quit_closure = run_loop.QuitClosure();
130 EXPECT_CALL(sink, OnVideoFrame()).WillOnce( 130 EXPECT_CALL(sink, OnVideoFrame()).WillOnce(
131 RunClosure(quit_closure)); 131 RunClosure(quit_closure));
132 cricket::WebRtcVideoFrame webrtc_frame; 132 cricket::WebRtcVideoFrame webrtc_frame;
133 webrtc_frame.InitToBlack(320, 240, 1, 1, 1); 133 webrtc_frame.InitToBlack(320, 240, 1);
134 source()->RenderInterfaceForTest()->RenderFrame(&webrtc_frame); 134 source()->RenderInterfaceForTest()->RenderFrame(&webrtc_frame);
135 run_loop.Run(); 135 run_loop.Run();
136 136
137 EXPECT_EQ(1, sink.number_of_frames()); 137 EXPECT_EQ(1, sink.number_of_frames());
138 track->RemoveSink(&sink); 138 track->RemoveSink(&sink);
139 } 139 }
140 140
141 TEST_F(MediaStreamRemoteVideoSourceTest, RemoteTrackStop) { 141 TEST_F(MediaStreamRemoteVideoSourceTest, RemoteTrackStop) {
142 scoped_ptr<MediaStreamVideoTrack> track(CreateTrack()); 142 scoped_ptr<MediaStreamVideoTrack> track(CreateTrack());
143 143
144 MockMediaStreamVideoSink sink; 144 MockMediaStreamVideoSink sink;
145 track->AddSink(&sink, sink.GetDeliverFrameCB()); 145 track->AddSink(&sink, sink.GetDeliverFrameCB());
146 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive, sink.state()); 146 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive, sink.state());
147 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive, 147 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive,
148 webkit_source().readyState()); 148 webkit_source().readyState());
149 StopWebRtcTrack(); 149 StopWebRtcTrack();
150 base::RunLoop().RunUntilIdle(); 150 base::RunLoop().RunUntilIdle();
151 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, 151 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded,
152 webkit_source().readyState()); 152 webkit_source().readyState());
153 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink.state()); 153 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink.state());
154 154
155 track->RemoveSink(&sink); 155 track->RemoveSink(&sink);
156 } 156 }
157 157
158 } // namespace content 158 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/webrtc_video_capturer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698