4 Commits

Author SHA1 Message Date
deadbeef
1dcb16409a 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}
2017-03-30 04:08:16 +00:00
jbauch
81bf7b0725 Pass ownership of candidate to PeerConnection::OnIceCandidate
This will later allow calling the "PeerConnectionObserver::OnIceCandidate"
method asynchronously while keeping the object alive.

BUG=webrtc:3721

Review-Url: https://codereview.webrtc.org/2748253003
Cr-Commit-Position: refs/heads/master@{#17380}
2017-03-25 15:31:12 +00:00
zstein
6dfd53a81e Rename PeerConnection::OnIceConnectionChange to OnIceConnectionStateChange
for consistency with the WebRTC 1.0 standard as suggested in a TODO.

BUG=None

Review-Url: https://codereview.webrtc.org/2732663004
Cr-Commit-Position: refs/heads/master@{#17077}
2017-03-06 21:49:03 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00