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

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

Issue 99113003: Define the interface for MediaStreamVideoSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "content/renderer/media/media_stream_video_source.h"
8 #include "media/base/video_frame.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace content {
12
13 class MediaStreamVideoSourceTest
14 : public ::testing::Test,
15 public MediaStreamVideoSource {
16 public:
17 MediaStreamVideoSourceTest() {}
18 };
19
20 TEST_F(MediaStreamVideoSourceTest, OnVideoFrame) {
21 blink::WebMediaConstraints constraints;
22 blink::WebMediaStreamTrack track;
23 AddTrack(track, constraints);
24 SetReadyState(blink::WebMediaStreamSource::ReadyStateLive);
25 const int kWidth = 640;
26 const int kHeight = 480;
27 scoped_refptr<media::VideoFrame> frame =
28 media::VideoFrame::CreateBlackFrame(gfx::Size(kWidth, kHeight));
29 ASSERT_TRUE(frame.get());
30 DeliverVideoFrame(frame);
31 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
32 RemoveTrack(track);
33 }
34
35 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698