Index: talk/app/webrtc/peerconnection_unittest.cc |
diff --git a/talk/app/webrtc/peerconnection_unittest.cc b/talk/app/webrtc/peerconnection_unittest.cc |
index 8d0793e25f83f90e85f848e7277725490c707824..ef3bf6288c3cc0b3210b20f6dd6131a5208d7b01 100644 |
--- a/talk/app/webrtc/peerconnection_unittest.cc |
+++ b/talk/app/webrtc/peerconnection_unittest.cc |
@@ -251,6 +251,7 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, |
signaling_message_receiver_->ReceiveIceMessage( |
candidate->sdp_mid(), candidate->sdp_mline_index(), ice_sdp); |
} |
+ void OnFirstPacketReceived() override { received_packet_ = true; } |
// MediaStreamInterface callback |
void OnChanged() override { |
@@ -386,6 +387,8 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, |
return true; |
} |
+ bool received_packet() const { return received_packet_; } |
+ |
void OnIceComplete() override { LOG(INFO) << id_ << "OnIceComplete"; } |
void OnDataChannel(DataChannelInterface* data_channel) override { |
@@ -924,6 +927,10 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, |
rtc::scoped_refptr<DataChannelInterface> data_channel_; |
rtc::scoped_ptr<MockDataChannelObserver> data_observer_; |
+ |
+ // "true" if the PeerConnection indicated that a packet was received, |
+ // through PeerConnectionObserverInterface. |
+ bool received_packet_ = false; |
}; |
class P2PTestConductor : public testing::Test { |
@@ -1104,6 +1111,10 @@ class P2PTestConductor : public testing::Test { |
EXPECT_TRUE_WAIT(FramesNotPending(audio_frame_count, video_frame_count), |
kMaxWaitForFramesMs); |
+ if (audio_frame_count != -1 || video_frame_count != -1) { |
+ EXPECT_TRUE(initiating_client_->received_packet()); |
+ EXPECT_TRUE(receiving_client_->received_packet()); |
+ } |
} |
void SetupAndVerifyDtlsCall() { |