diff --git a/api/BUILD.gn b/api/BUILD.gn index a5e7d91a6d..b80e500527 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -949,6 +949,8 @@ if (rtc_include_tests) { deps = [ ":libjingle_peerconnection_api", + "../api:scoped_refptr", + "../rtc_base:refcount", "../test:test_support", ] } diff --git a/api/DEPS b/api/DEPS index cdd17e9909..e912cd49f8 100644 --- a/api/DEPS +++ b/api/DEPS @@ -271,6 +271,10 @@ specific_include_rules = { "+test/gmock.h", ], + "mock_peerconnectioninterface\.h": [ + "+rtc_base/ref_counted_object.h", + ], + "simulated_network\.h": [ "+rtc_base/random.h", "+rtc_base/thread_annotations.h", diff --git a/api/test/mock_peerconnectioninterface.h b/api/test/mock_peerconnectioninterface.h index b5d94238c8..cd67d32a10 100644 --- a/api/test/mock_peerconnectioninterface.h +++ b/api/test/mock_peerconnectioninterface.h @@ -18,7 +18,9 @@ #include #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "api/sctp_transport_interface.h" +#include "rtc_base/ref_counted_object.h" #include "test/gmock.h" namespace webrtc { @@ -26,6 +28,10 @@ namespace webrtc { class MockPeerConnectionInterface : public rtc::RefCountedObject { public: + static rtc::scoped_refptr Create() { + return new MockPeerConnectionInterface(); + } + // PeerConnectionInterface MOCK_METHOD(rtc::scoped_refptr, local_streams,