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

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

Issue 1304393004: Change VideoCaptureDeliverFrameCB's signature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 private: 131 private:
132 base::Closure callback_; 132 base::Closure callback_;
133 bool* correct_; 133 bool* correct_;
134 base::ThreadCheckerImpl thread_checker_; 134 base::ThreadCheckerImpl thread_checker_;
135 }; 135 };
136 136
137 void CheckThreadVideoFrameReceiver( 137 void CheckThreadVideoFrameReceiver(
138 CheckThreadHelper* helper, 138 CheckThreadHelper* helper,
139 const scoped_refptr<media::VideoFrame>& frame, 139 const scoped_refptr<media::VideoFrame>& frame,
140 const base::TimeTicks& estimated_capture_time) { 140 base::TimeTicks estimated_capture_time) {
141 // Do nothing. 141 // Do nothing.
142 } 142 }
143 143
144 // Checks that the callback given to the track is reset on the right thread. 144 // Checks that the callback given to the track is reset on the right thread.
145 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) { 145 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) {
146 MockMediaStreamVideoSink sink; 146 MockMediaStreamVideoSink sink;
147 blink::WebMediaStreamTrack track = CreateTrack(); 147 blink::WebMediaStreamTrack track = CreateTrack();
148 148
149 base::RunLoop run_loop; 149 base::RunLoop run_loop;
150 bool correct = false; 150 bool correct = false;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 MediaStreamVideoTrack* const native_track2 = 224 MediaStreamVideoTrack* const native_track2 =
225 MediaStreamVideoTrack::GetVideoTrack(track2); 225 MediaStreamVideoTrack::GetVideoTrack(track2);
226 native_track2->Stop(); 226 native_track2->Stop();
227 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state()); 227 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state());
228 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, 228 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded,
229 blink_source().readyState()); 229 blink_source().readyState());
230 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2); 230 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2);
231 } 231 }
232 232
233 } // namespace content 233 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698