| 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 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 class RTCPeerConnectionHandlerTest : public ::testing::Test { | 192 class RTCPeerConnectionHandlerTest : public ::testing::Test { |
| 193 public: | 193 public: |
| 194 RTCPeerConnectionHandlerTest() : mock_peer_connection_(NULL) { | 194 RTCPeerConnectionHandlerTest() : mock_peer_connection_(NULL) { |
| 195 } | 195 } |
| 196 | 196 |
| 197 virtual void SetUp() { | 197 virtual void SetUp() { |
| 198 mock_client_.reset(new NiceMock<MockWebRTCPeerConnectionHandlerClient>()); | 198 mock_client_.reset(new NiceMock<MockWebRTCPeerConnectionHandlerClient>()); |
| 199 mock_dependency_factory_.reset(new MockMediaStreamDependencyFactory()); | 199 mock_dependency_factory_.reset(new MockMediaStreamDependencyFactory()); |
| 200 mock_dependency_factory_->EnsurePeerConnectionFactory(); | |
| 201 pc_handler_.reset( | 200 pc_handler_.reset( |
| 202 new RTCPeerConnectionHandlerUnderTest(mock_client_.get(), | 201 new RTCPeerConnectionHandlerUnderTest(mock_client_.get(), |
| 203 mock_dependency_factory_.get())); | 202 mock_dependency_factory_.get())); |
| 204 mock_tracker_.reset(new NiceMock<MockPeerConnectionTracker>()); | 203 mock_tracker_.reset(new NiceMock<MockPeerConnectionTracker>()); |
| 205 blink::WebRTCConfiguration config; | 204 blink::WebRTCConfiguration config; |
| 206 blink::WebMediaConstraints constraints; | 205 blink::WebMediaConstraints constraints; |
| 207 EXPECT_TRUE(pc_handler_->InitializeForTest(config, constraints, | 206 EXPECT_TRUE(pc_handler_->InitializeForTest(config, constraints, |
| 208 mock_tracker_.get())); | 207 mock_tracker_.get())); |
| 209 | 208 |
| 210 mock_peer_connection_ = pc_handler_->native_peer_connection(); | 209 mock_peer_connection_ = pc_handler_->native_peer_connection(); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 EXPECT_CALL(*mock_tracker_.get(), | 815 EXPECT_CALL(*mock_tracker_.get(), |
| 817 TrackCreateDTMFSender(pc_handler_.get(), | 816 TrackCreateDTMFSender(pc_handler_.get(), |
| 818 testing::Ref(tracks[0]))); | 817 testing::Ref(tracks[0]))); |
| 819 | 818 |
| 820 scoped_ptr<blink::WebRTCDTMFSenderHandler> sender( | 819 scoped_ptr<blink::WebRTCDTMFSenderHandler> sender( |
| 821 pc_handler_->createDTMFSender(tracks[0])); | 820 pc_handler_->createDTMFSender(tracks[0])); |
| 822 EXPECT_TRUE(sender.get()); | 821 EXPECT_TRUE(sender.get()); |
| 823 } | 822 } |
| 824 | 823 |
| 825 } // namespace content | 824 } // namespace content |
| OLD | NEW |