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

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

Issue 131763002: Adds MediaStreamSource, MediaStreamAudioSource and MediaStreamVideoCaptureDeviceSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 10 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/video_destination_handler_unittest.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')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 <string> 5 #include <string>
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/renderer/media/media_stream_extra_data.h" 8 #include "content/renderer/media/media_stream_extra_data.h"
9 #include "content/renderer/media/media_stream_registry_interface.h" 9 #include "content/renderer/media/media_stream_registry_interface.h"
10 #include "content/renderer/media/mock_media_stream_dependency_factory.h" 10 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 private: 39 private:
40 scoped_ptr<VideoFrame> last_frame_; 40 scoped_ptr<VideoFrame> last_frame_;
41 }; 41 };
42 42
43 class VideoSourceHandlerTest : public ::testing::Test { 43 class VideoSourceHandlerTest : public ::testing::Test {
44 public: 44 public:
45 VideoSourceHandlerTest() : registry_(&dependency_factory_) { 45 VideoSourceHandlerTest() : registry_(&dependency_factory_) {
46 handler_.reset(new VideoSourceHandler(&registry_)); 46 handler_.reset(new VideoSourceHandler(&registry_));
47 dependency_factory_.EnsurePeerConnectionFactory();
48 registry_.Init(kTestStreamUrl); 47 registry_.Init(kTestStreamUrl);
49 registry_.AddVideoTrack(kTestVideoTrackId); 48 registry_.AddVideoTrack(kTestVideoTrackId);
50 } 49 }
51 50
52 protected: 51 protected:
53 scoped_ptr<VideoSourceHandler> handler_; 52 scoped_ptr<VideoSourceHandler> handler_;
54 MockMediaStreamDependencyFactory dependency_factory_; 53 MockMediaStreamDependencyFactory dependency_factory_;
55 MockMediaStreamRegistry registry_; 54 MockMediaStreamRegistry registry_;
56 }; 55 };
57 56
(...skipping 28 matching lines...) Expand all
86 EXPECT_TRUE(handler_->Close(&reader)); 85 EXPECT_TRUE(handler_->Close(&reader));
87 EXPECT_TRUE(handler_->GetReceiver(&reader) == NULL); 86 EXPECT_TRUE(handler_->GetReceiver(&reader) == NULL);
88 } 87 }
89 88
90 TEST_F(VideoSourceHandlerTest, OpenWithoutClose) { 89 TEST_F(VideoSourceHandlerTest, OpenWithoutClose) {
91 FakeFrameReader reader; 90 FakeFrameReader reader;
92 EXPECT_TRUE(handler_->Open(kTestStreamUrl, &reader)); 91 EXPECT_TRUE(handler_->Open(kTestStreamUrl, &reader));
93 } 92 }
94 93
95 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_destination_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698