Commit d1ac10ff authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Revert "webrtc wpt: add test for ice disconnection"

This reverts commit 6f2e9bd4.

Reason for revert: Causing test flakiness.

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/WebKit%20Mac10.13%20%28retina%29/12015

Original change's description:
> webrtc wpt: add test for ice disconnection
> 
> adds a test verifying that ICE goes to disconnected if the other side goes away.
> Testing that the iceConnectionState goes to failed would be great but this can
> take up to 30s, making it hard to test.
> 
> BUG=920188
> 
> Change-Id: I8f9cce99a4b6fd6b3d6fe7530a8b707ab2ace3ed
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1541176
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Reviewed-by: Henrik Boström <hbos@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#645871}

TBR=hbos@chromium.org,philipp.hancke@googlemail.com,jonasolsson@chromium.org

Change-Id: Ie5f9e53c8414ef4f7a83e276bd2cd9bdadd8e876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 920188
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546519Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#645949}
parent 7f8c2775
......@@ -224,21 +224,6 @@ function listenToIceConnected(pc) {
});
}
// Returns a promise that resolves when |pc.iceConnectionState| is in one of the
// wanted states.
function waitForIceStateChange(pc, wantedStates) {
return new Promise((resolve) => {
if (wantedStates.includes(pc.iceConnectionState)) {
resolve();
return;
}
pc.addEventListener('iceconnectionstatechange', () => {
if (wantedStates.includes(pc.iceConnectionState))
resolve();
});
});
}
// Returns a promise that resolves when |pc.connectionState| is 'connected'.
function listenToConnected(pc) {
return new Promise((resolve) => {
......
......@@ -4,6 +4,5 @@ PASS Closing the connection should set iceConnectionState to closed
PASS connection with one data channel should eventually have connected or completed connection state
FAIL connection with one data channel should eventually have connected connection state Cannot read property 'state' of undefined
PASS ICE can connect in a recvonly usecase
PASS ICE goes to disconnected if the other side goes away
Harness: the test ran to completion.
......@@ -190,7 +190,6 @@ async_test(t => {
caller.addTransceiver('audio', {direction:'recvonly'});
const stream = await navigator.mediaDevices.getUserMedia({audio:true});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
const [track] = stream.getTracks();
callee.addTrack(track, stream);
exchangeIceCandidates(caller, callee);
......@@ -203,27 +202,6 @@ async_test(t => {
await listenToIceConnected(caller);
}, 'ICE can connect in a recvonly usecase');
promise_test(async t => {
const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close());
const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close());
const stream = await navigator.mediaDevices.getUserMedia({audio:true});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
const [track] = stream.getTracks();
caller.addTrack(track, stream);
exchangeIceCandidates(caller, callee);
await doSignalingHandshake(caller, callee);
await listenToIceConnected(caller);
callee.close();
await waitForIceStateChange(caller, ['disconnected', 'failed']);
// TODO: this should eventually transition to failed but that takes
// somewhat long (15-30s) so is not testable.
}, 'ICE goes to disconnected if the other side goes away');
/*
TODO
4.4.4 RTCIceConnectionState Enum
......
......@@ -4,6 +4,5 @@ PASS Closing the connection should set iceConnectionState to closed
PASS connection with one data channel should eventually have connected or completed connection state
FAIL connection with one data channel should eventually have connected connection state Cannot read property 'transport' of null
FAIL ICE can connect in a recvonly usecase promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument."
PASS ICE goes to disconnected if the other side goes away
Harness: the test ran to completion.
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