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

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

Issue 10919122: Move creation of PeerConnection from the RenderView to the RenderThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding missing files content/renderer/media/webrtc_uma_histograms.h Created 8 years, 3 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 <string> 5 #include <string>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/renderer/media/media_stream_extra_data.h" 9 #include "content/renderer/media/media_stream_extra_data.h"
10 #include "content/renderer/media/mock_media_stream_dependency_factory.h" 10 #include "content/renderer/media/mock_media_stream_dependency_factory.h"
(...skipping 25 matching lines...) Expand all
36 }; 36 };
37 37
38 class PeerConnectionHandlerJsepTest : public ::testing::Test { 38 class PeerConnectionHandlerJsepTest : public ::testing::Test {
39 public: 39 public:
40 PeerConnectionHandlerJsepTest() : mock_peer_connection_(NULL) { 40 PeerConnectionHandlerJsepTest() : mock_peer_connection_(NULL) {
41 } 41 }
42 42
43 void SetUp() { 43 void SetUp() {
44 mock_client_.reset(new WebKit::MockWebPeerConnection00HandlerClient()); 44 mock_client_.reset(new WebKit::MockWebPeerConnection00HandlerClient());
45 mock_dependency_factory_.reset( 45 mock_dependency_factory_.reset(
46 new MockMediaStreamDependencyFactory(NULL)); 46 new MockMediaStreamDependencyFactory());
47 mock_dependency_factory_->CreatePeerConnectionFactory(NULL, 47 mock_dependency_factory_->EnsurePeerConnectionFactory();
48 NULL,
49 NULL,
50 NULL,
51 NULL);
52 pc_handler_.reset( 48 pc_handler_.reset(
53 new PeerConnectionHandlerJsepUnderTest(mock_client_.get(), 49 new PeerConnectionHandlerJsepUnderTest(mock_client_.get(),
54 mock_dependency_factory_.get())); 50 mock_dependency_factory_.get()));
55 51
56 WebKit::WebString server_config( 52 WebKit::WebString server_config(
57 WebKit::WebString::fromUTF8("STUN stun.l.google.com:19302")); 53 WebKit::WebString::fromUTF8("STUN stun.l.google.com:19302"));
58 WebKit::WebString username; 54 WebKit::WebString username;
59 pc_handler_->initialize(server_config, username); 55 pc_handler_->initialize(server_config, username);
60 56
61 mock_peer_connection_ = pc_handler_->native_peer_connection(); 57 mock_peer_connection_ = pc_handler_->native_peer_connection();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream_2( 296 talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream_2(
301 AddRemoteMockMediaStream(stream_label_2, video_track_label_2, 297 AddRemoteMockMediaStream(stream_label_2, video_track_label_2,
302 audio_track_label_2)); 298 audio_track_label_2));
303 299
304 pc_handler_->OnAddStream(stream_1); 300 pc_handler_->OnAddStream(stream_1);
305 EXPECT_EQ(stream_label_1, mock_client_->stream_label()); 301 EXPECT_EQ(stream_label_1, mock_client_->stream_label());
306 302
307 pc_handler_->OnAddStream(stream_2); 303 pc_handler_->OnAddStream(stream_2);
308 EXPECT_EQ(stream_label_2, mock_client_->stream_label()); 304 EXPECT_EQ(stream_label_2, mock_client_->stream_label());
309 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698