| Index: chrome/test/data/webrtc/peerconnection.js
|
| diff --git a/chrome/test/data/webrtc/peerconnection.js b/chrome/test/data/webrtc/peerconnection.js
|
| index 32a7587cc9890dd83b1b5735c3a99c8eefde905f..d236dc51303ae40b6170ca66954d0e2ebea9c268 100644
|
| --- a/chrome/test/data/webrtc/peerconnection.js
|
| +++ b/chrome/test/data/webrtc/peerconnection.js
|
| @@ -17,6 +17,12 @@ var gPeerConnection = null;
|
| var gIceCandidates = [];
|
|
|
| /**
|
| + * This stores last ICE gathering state emitted on this side.
|
| + * @private
|
| + */
|
| +var gIceGatheringState = 'no-gathering-state';
|
| +
|
| +/**
|
| * Keeps track of whether we have seen crypto information in the SDP.
|
| * @private
|
| */
|
| @@ -417,6 +423,13 @@ function measureGetStatsCallbackPerformance() {
|
| });
|
| }
|
|
|
| +/**
|
| + * Returns the last iceGatheringState emitted from icegatheringstatechange.
|
| + */
|
| +function getLastGatheringState() {
|
| + returnToTest(gIceGatheringState);
|
| +}
|
| +
|
| // Internals.
|
|
|
| /** @private */
|
| @@ -429,6 +442,7 @@ function createPeerConnection_(rtcConfig) {
|
| peerConnection.onaddstream = addStreamCallback_;
|
| peerConnection.onremovestream = removeStreamCallback_;
|
| peerConnection.onicecandidate = iceCallback_;
|
| + peerConnection.onicegatheringstatechange = iceGatheringCallback_;
|
| return peerConnection;
|
| }
|
|
|
| @@ -446,6 +460,12 @@ function iceCallback_(event) {
|
| }
|
|
|
| /** @private */
|
| +function iceGatheringCallback_() {
|
| + gIceGatheringState = peerConnection.iceGatheringState;
|
| +}
|
| +
|
| +
|
| +/** @private */
|
| function setLocalDescription(peerConnection, sessionDescription) {
|
| if (sessionDescription.sdp.search('a=crypto') != -1 ||
|
| sessionDescription.sdp.search('a=fingerprint') != -1)
|
|
|