| Index: content/renderer/media/media_stream_video_source_unittest.cc
|
| ===================================================================
|
| --- content/renderer/media/media_stream_video_source_unittest.cc (revision 0)
|
| +++ content/renderer/media/media_stream_video_source_unittest.cc (revision 0)
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include <string>
|
| +
|
| +#include "content/public/renderer/media_stream_video_sink.h"
|
| +#include "content/renderer/media/media_stream_video_source.h"
|
| +#include "media/base/video_frame.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace content {
|
| +
|
| +class MediaStreamVideoSourceTest : public ::testing::Test {
|
| + public:
|
| + MediaStreamVideoSourceTest() {
|
| + }
|
| +
|
| + protected:
|
| + MediaStreamVideoSource source_;
|
| +};
|
| +
|
| +TEST_F(MediaStreamVideoSourceTest, OnVideoFrame) {
|
| + blink::WebMediaConstraints constrains;
|
| + blink::WebMediaStreamTrack track;
|
| + source_.AddTrack(track, constrains);
|
| + const int kWidth = 640;
|
| + const int kHeight = 480;
|
| + scoped_refptr<media::VideoFrame> frame =
|
| + media::VideoFrame::CreateBlackFrame(gfx::Size(kWidth, kHeight));
|
| + ASSERT_TRUE(frame.get());
|
| + source_.PutVideoFrame(frame);
|
| + source_.RemoveTrack(track);
|
| +}
|
| +
|
| +} // namespace content
|
|
|
| Property changes on: content/renderer/media/media_stream_video_source_unittest.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|