Update MockPeerConnectionInterface and fake with missing methods.
Goal is to make PeerConnectionInterface methods pure virtual. This is a split of cl https://webrtc-review.googlesource.com/c/src/+/340143 in order to be able to fix Chromium test RTCPeerConnectionHandlerTest.OnRenegotiationNeeded Bug: none Change-Id: I5eac4d9a96c1b594c9e2b3505ef2466046065dc8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340481 Auto-Submit: Per Kjellander <perkj@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41798}
This commit is contained in:
parent
3f0d399c07
commit
3fe69c504c
@ -160,6 +160,10 @@ class MockPeerConnectionInterface : public webrtc::PeerConnectionInterface {
|
|||||||
(std::unique_ptr<SessionDescriptionInterface>,
|
(std::unique_ptr<SessionDescriptionInterface>,
|
||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>),
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>),
|
||||||
(override));
|
(override));
|
||||||
|
MOCK_METHOD(bool,
|
||||||
|
ShouldFireNegotiationNeededEvent,
|
||||||
|
(uint32_t event_id),
|
||||||
|
(override));
|
||||||
MOCK_METHOD(PeerConnectionInterface::RTCConfiguration,
|
MOCK_METHOD(PeerConnectionInterface::RTCConfiguration,
|
||||||
GetConfiguration,
|
GetConfiguration,
|
||||||
(),
|
(),
|
||||||
@ -195,6 +199,10 @@ class MockPeerConnectionInterface : public webrtc::PeerConnectionInterface {
|
|||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(PeerConnectionState, peer_connection_state, (), (override));
|
MOCK_METHOD(PeerConnectionState, peer_connection_state, (), (override));
|
||||||
MOCK_METHOD(IceGatheringState, ice_gathering_state, (), (override));
|
MOCK_METHOD(IceGatheringState, ice_gathering_state, (), (override));
|
||||||
|
MOCK_METHOD(void,
|
||||||
|
AddAdaptationResource,
|
||||||
|
(rtc::scoped_refptr<Resource>),
|
||||||
|
(override));
|
||||||
MOCK_METHOD(absl::optional<bool>, can_trickle_ice_candidates, (), (override));
|
MOCK_METHOD(absl::optional<bool>, can_trickle_ice_candidates, (), (override));
|
||||||
MOCK_METHOD(bool,
|
MOCK_METHOD(bool,
|
||||||
StartRtcEventLog,
|
StartRtcEventLog,
|
||||||
@ -206,6 +214,7 @@ class MockPeerConnectionInterface : public webrtc::PeerConnectionInterface {
|
|||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(void, StopRtcEventLog, (), (override));
|
MOCK_METHOD(void, StopRtcEventLog, (), (override));
|
||||||
MOCK_METHOD(void, Close, (), (override));
|
MOCK_METHOD(void, Close, (), (override));
|
||||||
|
MOCK_METHOD(rtc::Thread*, signaling_thread, (), (const override));
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(
|
static_assert(
|
||||||
|
|||||||
@ -177,6 +177,8 @@ class FakePeerConnectionBase : public PeerConnectionInternal {
|
|||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
|
||||||
override {}
|
override {}
|
||||||
|
|
||||||
|
bool ShouldFireNegotiationNeededEvent(uint32_t event_id) { return true; }
|
||||||
|
|
||||||
RTCConfiguration GetConfiguration() override { return RTCConfiguration(); }
|
RTCConfiguration GetConfiguration() override { return RTCConfiguration(); }
|
||||||
|
|
||||||
RTCError SetConfiguration(
|
RTCError SetConfiguration(
|
||||||
@ -229,6 +231,8 @@ class FakePeerConnectionBase : public PeerConnectionInternal {
|
|||||||
|
|
||||||
absl::optional<bool> can_trickle_ice_candidates() { return absl::nullopt; }
|
absl::optional<bool> can_trickle_ice_candidates() { return absl::nullopt; }
|
||||||
|
|
||||||
|
void AddAdaptationResource(rtc::scoped_refptr<Resource> resource) {}
|
||||||
|
|
||||||
bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
|
bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
|
||||||
int64_t output_period_ms) override {
|
int64_t output_period_ms) override {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -153,6 +153,10 @@ class MockPeerConnectionInternal : public PeerConnectionInternal {
|
|||||||
(std::unique_ptr<SessionDescriptionInterface>,
|
(std::unique_ptr<SessionDescriptionInterface>,
|
||||||
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>),
|
rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>),
|
||||||
(override));
|
(override));
|
||||||
|
MOCK_METHOD(bool,
|
||||||
|
ShouldFireNegotiationNeededEvent,
|
||||||
|
(uint32_t event_id),
|
||||||
|
(override));
|
||||||
MOCK_METHOD(PeerConnectionInterface::RTCConfiguration,
|
MOCK_METHOD(PeerConnectionInterface::RTCConfiguration,
|
||||||
GetConfiguration,
|
GetConfiguration,
|
||||||
(),
|
(),
|
||||||
@ -192,6 +196,10 @@ class MockPeerConnectionInternal : public PeerConnectionInternal {
|
|||||||
(override));
|
(override));
|
||||||
MOCK_METHOD(PeerConnectionState, peer_connection_state, (), (override));
|
MOCK_METHOD(PeerConnectionState, peer_connection_state, (), (override));
|
||||||
MOCK_METHOD(IceGatheringState, ice_gathering_state, (), (override));
|
MOCK_METHOD(IceGatheringState, ice_gathering_state, (), (override));
|
||||||
|
MOCK_METHOD(void,
|
||||||
|
AddAdaptationResource,
|
||||||
|
(rtc::scoped_refptr<Resource>),
|
||||||
|
(override));
|
||||||
MOCK_METHOD(absl::optional<bool>, can_trickle_ice_candidates, (), (override));
|
MOCK_METHOD(absl::optional<bool>, can_trickle_ice_candidates, (), (override));
|
||||||
MOCK_METHOD(bool,
|
MOCK_METHOD(bool,
|
||||||
StartRtcEventLog,
|
StartRtcEventLog,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user