Commit 35ae643e authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Enable IceGatheringState test

Rewrite test so that it does not hang (create promise before
event that it is waiting for).

Bug: chromium:1115080
Change-Id: Ic445bef22561a1d997b4d3657a76e1b0779a1259
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367854Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800544}
parent 8d060b34
......@@ -3062,7 +3062,6 @@ virtual/webrtc-wpt-plan-b/external/wpt/webrtc/RTCPeerConnection-restartIce-onneg
crbug.com/1110833 external/wpt/webrtc/RTCPeerConnection-explicit-rollback-iceGatheringState.html [ Timeout ]
# Tests that start hanging after implementing RTCRtpTransceiver.stop
crbug.com/1115080 external/wpt/webrtc/RTCPeerConnection-iceGatheringState.html [ Timeout Pass Failure ]
crbug.com/1115087 external/wpt/webrtc/RTCRtpTransceiver.https.html [ Timeout ]
# See also crbug.com/920100 (sheriff 2019-01-09).
......
This is a testharness.js-based test.
PASS Initial iceGatheringState should be new
PASS iceGatheringState should eventually become complete after setLocalDescription
PASS setLocalDescription(reoffer) with no new transports should not cause iceGatheringState to change
PASS setLocalDescription(reoffer) with a new transport should cause iceGatheringState to go to "checking" and then "complete"
PASS sRD does not cause ICE gathering state changes
FAIL renegotiation that closes all transports should result in ICE gathering state "new" promise_test: Unhandled rejection with value: object "TypeError: pc1.getTransceivers(...)[0].stop is not a function"
PASS connection with one data channel should eventually have connected connection state
Harness: the test ran to completion.
......@@ -133,17 +133,21 @@
await initialOfferAnswerWithIceGatheringStateTransitions(
pc1, pc2, {offerToReceiveAudio: true});
const pc1waiter = iceGatheringStateTransitions(pc1, 'new');
const pc2waiter = iceGatheringStateTransitions(pc2, 'new');
pc1.getTransceivers()[0].stop();
await pc1.setLocalDescription(await pc1.createOffer());
await pc2.setRemoteDescription(pc1.localDescription);
await pc2.setLocalDescription(await pc2.createAnswer());
assert_equals(pc2.getTransceivers().length, 0,
'PC2 transceivers should be invisible after negotiation');
await iceGatheringStateTransitions(pc2, 'new');
assert_equals(pc2.iceGatheringState, 'new');
await pc2waiter;
await pc1.setRemoteDescription(pc2.localDescription);
assert_equals(pc1.getTransceivers().length, 0,
'PC1 transceivers should be invisible after negotiation');
await iceGatheringStateTransitions(pc1, 'new');
'PC1 transceivers should be invisible after negotiation');
assert_equals(pc1.iceGatheringState, 'new');
await pc1waiter;
}, 'renegotiation that closes all transports should result in ICE gathering state "new"');
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment