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

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

Issue 2425703002: Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Fixed webkit_tests 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/macros.h" 6 #include "base/macros.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/child/child_process.h" 9 #include "content/child/child_process.h"
10 #include "content/renderer/media/media_stream_video_renderer_sink.h" 10 #include "content/renderer/media/media_stream_video_renderer_sink.h"
(...skipping 20 matching lines...) Expand all
31 closure.Run(); 31 closure.Run();
32 } 32 }
33 33
34 class MediaStreamVideoRendererSinkTest : public testing::Test { 34 class MediaStreamVideoRendererSinkTest : public testing::Test {
35 public: 35 public:
36 MediaStreamVideoRendererSinkTest() 36 MediaStreamVideoRendererSinkTest()
37 : child_process_(new ChildProcess()), 37 : child_process_(new ChildProcess()),
38 mock_source_(new MockMediaStreamVideoSource(false)) { 38 mock_source_(new MockMediaStreamVideoSource(false)) {
39 blink_source_.initialize(blink::WebString::fromASCII("dummy_source_id"), 39 blink_source_.initialize(blink::WebString::fromASCII("dummy_source_id"),
40 blink::WebMediaStreamSource::TypeVideo, 40 blink::WebMediaStreamSource::TypeVideo,
41 blink::WebString::fromASCII("dummy_source_name"), 41 blink::WebString::fromASCII("dummy_source_name"));
42 false /* remote */);
43 blink_source_.setExtraData(mock_source_); 42 blink_source_.setExtraData(mock_source_);
44 blink::WebMediaConstraints constraints; 43 blink::WebMediaConstraints constraints;
45 constraints.initialize(); 44 constraints.initialize();
46 blink_track_ = MediaStreamVideoTrack::CreateVideoTrack( 45 blink_track_ = MediaStreamVideoTrack::CreateVideoTrack(
47 mock_source_, constraints, MediaStreamSource::ConstraintsCallback(), 46 mock_source_, constraints, MediaStreamSource::ConstraintsCallback(),
48 true); 47 true);
49 mock_source_->StartMockedSource(); 48 mock_source_->StartMockedSource();
50 base::RunLoop().RunUntilIdle(); 49 base::RunLoop().RunUntilIdle();
51 50
52 media_stream_video_renderer_sink_ = new MediaStreamVideoRendererSink( 51 media_stream_video_renderer_sink_ = new MediaStreamVideoRendererSink(
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 const scoped_refptr<media::VideoFrame> video_frame = 220 const scoped_refptr<media::VideoFrame> video_frame =
222 media::VideoFrame::CreateFrame(media::PIXEL_FORMAT_YV12A, kSize, 221 media::VideoFrame::CreateFrame(media::PIXEL_FORMAT_YV12A, kSize,
223 gfx::Rect(kSize), kSize, kTimestamp); 222 gfx::Rect(kSize), kSize, kTimestamp);
224 OnVideoFrame(video_frame); 223 OnVideoFrame(video_frame);
225 base::RunLoop().RunUntilIdle(); 224 base::RunLoop().RunUntilIdle();
226 225
227 media_stream_video_renderer_sink_->Stop(); 226 media_stream_video_renderer_sink_->Stop();
228 } 227 }
229 228
230 } // namespace content 229 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698