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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,35 @@
+// 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/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 MediaStreamVideoSource {
+ public:
+ MediaStreamVideoSourceTest() {}
+};
+
+TEST_F(MediaStreamVideoSourceTest, OnVideoFrame) {
+ blink::WebMediaConstraints constraints;
+ blink::WebMediaStreamTrack track;
+ AddTrack(track, constraints);
+ SetReadyState(blink::WebMediaStreamSource::ReadyStateLive);
+ const int kWidth = 640;
+ const int kHeight = 480;
+ scoped_refptr<media::VideoFrame> frame =
+ media::VideoFrame::CreateBlackFrame(gfx::Size(kWidth, kHeight));
+ ASSERT_TRUE(frame.get());
+ DeliverVideoFrame(frame);
+ SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
+ RemoveTrack(track);
+}
+
+} // namespace content
Property changes on: content/renderer/media/media_stream_video_source_unittest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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