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

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: Addressed review comments. 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
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 22 matching lines...) Expand all
80 EXPECT_EQ(test_frame.GetTimeStamp(), frame->GetTimeStamp()); 79 EXPECT_EQ(test_frame.GetTimeStamp(), frame->GetTimeStamp());
81 EXPECT_EQ(test_frame.GetYPlane(), frame->GetYPlane()); 80 EXPECT_EQ(test_frame.GetYPlane(), frame->GetYPlane());
82 EXPECT_EQ(test_frame.GetUPlane(), frame->GetUPlane()); 81 EXPECT_EQ(test_frame.GetUPlane(), frame->GetUPlane());
83 EXPECT_EQ(test_frame.GetVPlane(), frame->GetVPlane()); 82 EXPECT_EQ(test_frame.GetVPlane(), frame->GetVPlane());
84 83
85 EXPECT_TRUE(handler_->Close(kTestStreamUrl, &reader)); 84 EXPECT_TRUE(handler_->Close(kTestStreamUrl, &reader));
86 EXPECT_TRUE(handler_->GetReceiver(&reader) == NULL); 85 EXPECT_TRUE(handler_->GetReceiver(&reader) == NULL);
87 } 86 }
88 87
89 } // namespace content 88 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698