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

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

Issue 10703095: New PeerConnection handler in Chrome to support latest PeerConnection draft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit test and mock. Removed old bad mock. Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/renderer/media/media_stream_impl.h" 8 #include "content/renderer/media/media_stream_impl.h"
9 #include "content/renderer/media/mock_media_stream_dependency_factory.h" 9 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
10 #include "content/renderer/media/mock_media_stream_dispatcher.h" 10 #include "content/renderer/media/mock_media_stream_dispatcher.h"
11 #include "content/renderer/media/mock_web_peer_connection_00_handler_client.h" 11 #include "content/renderer/media/mock_web_peer_connection_00_handler_client.h"
12 #include "content/renderer/media/mock_web_peer_connection_handler_client.h"
13 #include "content/renderer/media/peer_connection_handler_jsep.h" 12 #include "content/renderer/media/peer_connection_handler_jsep.h"
14 #include "content/renderer/media/video_capture_impl_manager.h" 13 #include "content/renderer/media/video_capture_impl_manager.h"
15 #include "content/renderer/p2p/socket_dispatcher.h" 14 #include "content/renderer/p2p/socket_dispatcher.h"
16 #include "media/base/message_loop_factory.h" 15 #include "media/base/message_loop_factory.h"
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amSource.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amSource.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00Handler.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00Handler.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
22 21
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ms_impl_->StopLocalMediaStream(mixed_desc); 148 ms_impl_->StopLocalMediaStream(mixed_desc);
150 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter()); 149 EXPECT_EQ(1, ms_dispatcher_->stop_stream_counter());
151 ms_impl_->StopLocalMediaStream(audio_desc); 150 ms_impl_->StopLocalMediaStream(audio_desc);
152 EXPECT_EQ(2, ms_dispatcher_->stop_stream_counter()); 151 EXPECT_EQ(2, ms_dispatcher_->stop_stream_counter());
153 152
154 // Test that the MediaStreams are deleted if the owning WebFrame is deleted. 153 // Test that the MediaStreams are deleted if the owning WebFrame is deleted.
155 // In the unit test the owning frame is NULL. 154 // In the unit test the owning frame is NULL.
156 ms_impl_->FrameWillClose(NULL); 155 ms_impl_->FrameWillClose(NULL);
157 EXPECT_EQ(3, ms_dispatcher_->stop_stream_counter()); 156 EXPECT_EQ(3, ms_dispatcher_->stop_stream_counter());
158 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698