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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/renderer/media/media_stream_extra_data.h" | 10 #include "content/renderer/media/media_stream_extra_data.h" |
11 #include "content/renderer/media/mock_media_stream_dependency_factory.h" | 11 #include "content/renderer/media/mock_media_stream_dependency_factory.h" |
12 #include "content/renderer/media/mock_web_peer_connection_handler_client.h" | 12 #include "content/renderer/media/mock_web_peer_connection_handler_client.h" |
13 #include "content/renderer/media/mock_peer_connection_impl.h" | 13 #include "content/renderer/media/mock_peer_connection_impl.h" |
14 #include "content/renderer/media/peer_connection_handler.h" | 14 #include "content/renderer/media/peer_connection_handler.h" |
15 #include "content/renderer/media/rtc_video_decoder.h" | 15 #include "content/renderer/media/rtc_video_decoder.h" |
16 #include "jingle/glue/thread_wrapper.h" | 16 #include "jingle/glue/thread_wrapper.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" | 18 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" |
21 | 21 |
22 class PeerConnectionHandlerUnderTest : public PeerConnectionHandler { | 22 class PeerConnectionHandlerUnderTest : public PeerConnectionHandler { |
23 public: | 23 public: |
24 PeerConnectionHandlerUnderTest( | 24 PeerConnectionHandlerUnderTest( |
25 WebKit::MockWebPeerConnectionHandlerClient* client, | 25 WebKit::MockWebPeerConnectionHandlerClient* client, |
26 MediaStreamDependencyFactory* dependency_factory) | 26 MediaStreamDependencyFactory* dependency_factory) |
27 : PeerConnectionHandler(client, dependency_factory) { | 27 : PeerConnectionHandler(client, dependency_factory) { |
28 } | 28 } |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 EXPECT_EQ(stream_label, mock_peer_connection_->stream_label()); | 192 EXPECT_EQ(stream_label, mock_peer_connection_->stream_label()); |
193 EXPECT_TRUE(mock_peer_connection_->stream_changes_committed()); | 193 EXPECT_TRUE(mock_peer_connection_->stream_changes_committed()); |
194 | 194 |
195 pc_handler_->stop(); | 195 pc_handler_->stop(); |
196 EXPECT_FALSE(pc_handler_->native_peer_connection()); | 196 EXPECT_FALSE(pc_handler_->native_peer_connection()); |
197 // PC handler is expected to be deleted when stop calls | 197 // PC handler is expected to be deleted when stop calls |
198 // MediaStreamImpl::ClosePeerConnection. We own and delete it here instead of | 198 // MediaStreamImpl::ClosePeerConnection. We own and delete it here instead of |
199 // in the mock. | 199 // in the mock. |
200 pc_handler_.reset(); | 200 pc_handler_.reset(); |
201 } | 201 } |
OLD | NEW |