Rewrite PeerConnection integration tests using better testing practices.
Also renames "peerconnection_unittests" to "peerconnection_integrationtests",
and moves the ICE URL parsing code to separate files.
The main problem previously was that the test assertions
occurred in various places in the main test class, and this shared test
code was overly complex and stateful. As a result, it was difficult to
tell what a test even does, let alone what assertions it's meant to be
making. And writing a new test that does what you want can be a
frustrating ordeal.
The new code still uses helper methods, but they have intuitive names
and a smaller role; all of the important parts of the test's logic are
in the test case itself.
We're planning on merging PeerConnection and WebRtcSession at some point
soon, so it seemed valuable to do this, so that the WebRtcSession tests
can be rewritten as PeerConnection tests using better patterns.
BUG=None
Review-Url: https://codereview.webrtc.org/2738353003
Cr-Commit-Position: refs/heads/master@{#17458}
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index b346783..e965457 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -648,12 +648,14 @@
const MediaConstraintsInterface* constraints) {}
// Sets the local session description.
- // JsepInterface takes the ownership of |desc| even if it fails.
+ // The PeerConnection takes the ownership of |desc| even if it fails.
// The |observer| callback will be called when done.
+ // TODO(deadbeef): Change |desc| to be a unique_ptr, to make it clear
+ // that this method always takes ownership of it.
virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
SessionDescriptionInterface* desc) = 0;
// Sets the remote session description.
- // JsepInterface takes the ownership of |desc| even if it fails.
+ // The PeerConnection takes the ownership of |desc| even if it fails.
// The |observer| callback will be called when done.
virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
SessionDescriptionInterface* desc) = 0;