OLD | NEW |
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 26 matching lines...) Expand all Loading... |
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(NULL)); |
47 mock_dependency_factory_->CreatePeerConnectionFactory(NULL, | 47 mock_dependency_factory_->CreatePeerConnectionFactory(0, |
48 NULL, | 48 NULL, |
49 NULL, | 49 NULL, |
50 NULL, | 50 NULL, |
| 51 NULL, |
51 NULL); | 52 NULL); |
52 pc_handler_.reset( | 53 pc_handler_.reset( |
53 new PeerConnectionHandlerJsepUnderTest(mock_client_.get(), | 54 new PeerConnectionHandlerJsepUnderTest(mock_client_.get(), |
54 mock_dependency_factory_.get())); | 55 mock_dependency_factory_.get())); |
55 | 56 |
56 WebKit::WebString server_config( | 57 WebKit::WebString server_config( |
57 WebKit::WebString::fromUTF8("STUN stun.l.google.com:19302")); | 58 WebKit::WebString::fromUTF8("STUN stun.l.google.com:19302")); |
58 WebKit::WebString username; | 59 WebKit::WebString username; |
59 pc_handler_->initialize(server_config, username); | 60 pc_handler_->initialize(server_config, username); |
60 | 61 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream_2( | 302 talk_base::scoped_refptr<webrtc::MediaStreamInterface> stream_2( |
302 AddRemoteMockMediaStream(stream_label_2, video_track_label_2, | 303 AddRemoteMockMediaStream(stream_label_2, video_track_label_2, |
303 audio_track_label_2)); | 304 audio_track_label_2)); |
304 | 305 |
305 pc_handler_->OnAddStream(stream_1); | 306 pc_handler_->OnAddStream(stream_1); |
306 EXPECT_EQ(stream_label_1, mock_client_->stream_label()); | 307 EXPECT_EQ(stream_label_1, mock_client_->stream_label()); |
307 | 308 |
308 pc_handler_->OnAddStream(stream_2); | 309 pc_handler_->OnAddStream(stream_2); |
309 EXPECT_EQ(stream_label_2, mock_client_->stream_label()); | 310 EXPECT_EQ(stream_label_2, mock_client_->stream_label()); |
310 } | 311 } |
OLD | NEW |