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

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 7 years 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
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 : public ::testing::Test {
14 public:
15 MediaStreamVideoSourceTest() {
16 }
17
18 protected:
19 MediaStreamVideoSource source_;
20 };
21
22 TEST_F(MediaStreamVideoSourceTest, OnVideoFrame) {
23 blink::WebMediaConstraints constraints;
24 blink::WebMediaStreamTrack track;
25 source_.AddTrack(track, constraints);
26 source_.SetReadyState(blink::WebMediaStreamSource::ReadyStateLive);
27 const int kWidth = 640;
28 const int kHeight = 480;
29 scoped_refptr<media::VideoFrame> frame =
30 media::VideoFrame::CreateBlackFrame(gfx::Size(kWidth, kHeight));
31 ASSERT_TRUE(frame.get());
32 source_.PutVideoFrame(frame);
33 source_.SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
34 source_.RemoveTrack(track);
35 }
36
37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698