OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/media/mock_web_rtc_peer_connection_handler_client.h" | 5 #include "content/renderer/media/mock_web_rtc_peer_connection_handler_client.h" |
6 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" | 6 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" | 8 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 class PeerConnectionDependencyFactoryTest : public ::testing::Test { | 12 class PeerConnectionDependencyFactoryTest : public ::testing::Test { |
13 public: | 13 public: |
14 virtual void SetUp() { | 14 void SetUp() override { |
15 dependency_factory_.reset(new MockPeerConnectionDependencyFactory()); | 15 dependency_factory_.reset(new MockPeerConnectionDependencyFactory()); |
16 } | 16 } |
17 | 17 |
18 protected: | 18 protected: |
19 scoped_ptr<MockPeerConnectionDependencyFactory> dependency_factory_; | 19 scoped_ptr<MockPeerConnectionDependencyFactory> dependency_factory_; |
20 }; | 20 }; |
21 | 21 |
22 TEST_F(PeerConnectionDependencyFactoryTest, CreateRTCPeerConnectionHandler) { | 22 TEST_F(PeerConnectionDependencyFactoryTest, CreateRTCPeerConnectionHandler) { |
23 MockWebRTCPeerConnectionHandlerClient client_jsep; | 23 MockWebRTCPeerConnectionHandlerClient client_jsep; |
24 scoped_ptr<blink::WebRTCPeerConnectionHandler> pc_handler( | 24 scoped_ptr<blink::WebRTCPeerConnectionHandler> pc_handler( |
25 dependency_factory_->CreateRTCPeerConnectionHandler(&client_jsep)); | 25 dependency_factory_->CreateRTCPeerConnectionHandler(&client_jsep)); |
26 EXPECT_TRUE(pc_handler.get() != NULL); | 26 EXPECT_TRUE(pc_handler.get() != NULL); |
27 } | 27 } |
28 | 28 |
29 } // namespace content | 29 } // namespace content |
OLD | NEW |