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

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

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 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
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 DeliverVideoFrameAndWaitForRenderer(&sink); 117 DeliverVideoFrameAndWaitForRenderer(&sink);
118 118
119 sink.DisconnectFromTrack(); 119 sink.DisconnectFromTrack();
120 120
121 scoped_refptr<media::VideoFrame> frame = 121 scoped_refptr<media::VideoFrame> frame =
122 media::VideoFrame::CreateBlackFrame( 122 media::VideoFrame::CreateBlackFrame(
123 gfx::Size(MediaStreamVideoSource::kDefaultWidth, 123 gfx::Size(MediaStreamVideoSource::kDefaultWidth,
124 MediaStreamVideoSource::kDefaultHeight)); 124 MediaStreamVideoSource::kDefaultHeight));
125 mock_source()->DeliverVideoFrame(frame); 125 mock_source()->DeliverVideoFrame(frame);
126 // Wait for the IO thread to complete delivering frames. 126 // Wait for the IO thread to complete delivering frames.
127 io_message_loop()->RunUntilIdle(); 127 base::RunLoop().RunUntilIdle();
128 EXPECT_EQ(2, sink.number_of_frames()); 128 EXPECT_EQ(2, sink.number_of_frames());
129 } 129 }
130 130
131 class CheckThreadHelper { 131 class CheckThreadHelper {
132 public: 132 public:
133 CheckThreadHelper(base::Closure callback, bool* correct) 133 CheckThreadHelper(base::Closure callback, bool* correct)
134 : callback_(callback), 134 : callback_(callback),
135 correct_(correct) { 135 correct_(correct) {
136 } 136 }
137 137
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 base::Closure quit_closure = run_loop.QuitClosure(); 249 base::Closure quit_closure = run_loop.QuitClosure();
250 EXPECT_CALL(sink, OnVideoFrame()).WillOnce(RunClosure(quit_closure)); 250 EXPECT_CALL(sink, OnVideoFrame()).WillOnce(RunClosure(quit_closure));
251 sink.ConnectToTrack(track); 251 sink.ConnectToTrack(track);
252 run_loop.Run(); 252 run_loop.Run();
253 EXPECT_EQ(1, sink.number_of_frames()); 253 EXPECT_EQ(1, sink.number_of_frames());
254 254
255 sink.DisconnectFromTrack(); 255 sink.DisconnectFromTrack();
256 } 256 }
257 257
258 } // namespace content 258 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor_unittest.cc ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698