Properly setup MockPeerConnectionObserver in tests (continued).

This CL prevents dereferencing potentially null pointer by
setting the pointer in client code.

We can now safely call PeerConnection::Close(), which happens
to trigger OnIceConnectionChange() on the observer.

This is a followup to: https://webrtc-review.googlesource.com/c/src/+/107706

Bug: webrtc:9855
Change-Id: Ieebf8415f0a12fe87d8cd80d1eb06797926005df
Reviewed-on: https://webrtc-review.googlesource.com/c/108785
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25462}
diff --git a/pc/peerconnection_rtp_unittest.cc b/pc/peerconnection_rtp_unittest.cc
index 8453f17..8128584 100644
--- a/pc/peerconnection_rtp_unittest.cc
+++ b/pc/peerconnection_rtp_unittest.cc
@@ -117,6 +117,8 @@
     auto observer = absl::make_unique<MockPeerConnectionObserver>();
     auto pc = pc_factory_->CreatePeerConnection(config, nullptr, nullptr,
                                                 observer.get());
+    EXPECT_TRUE(pc.get());
+    observer->SetPeerConnectionInterface(pc.get());
     return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
                                                     std::move(observer));
   }