зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1523562 [wpt PR 14931] - Revert "Switch to new ICE state implementation", a=testonly
Automatic update from web-platform-tests Revert "Switch to new ICE state implementation" This reverts commit e902e08dc0c67fd7598a4a4e431177f89c00f350. Reason for revert: crbug.com/922588 Original change's description: > Switch to new ICE state implementation > > With this change the ice/dtls connection states should finally be compliant to the spec. > > Bug: webrtc:6145 > Change-Id: I1e7c13f22e40b534e732ecd3fc103f617306f00a > Reviewed-on: https://chromium-review.googlesource.com/c/1371392 > Commit-Queue: Jonas Olsson <jonasolsson@chromium.org> > Reviewed-by: Henrik Boström <hbos@chromium.org> > Cr-Commit-Position: refs/heads/master@{#617476} TBR=hbos@chromium.org,jonasolsson@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:6145 Change-Id: I0754ba6241b612c449715590de864307b989c57b Reviewed-on: https://chromium-review.googlesource.com/c/1418314 Reviewed-by: Steve Anton <steveanton@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Steve Anton <steveanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#623838} -- wpt-commits: 56fde7485b5ffa5f8933594ae6e09db7a2edddaf wpt-pr: 14931
This commit is contained in:
Родитель
49a6bfea33
Коммит
155fc2a0be
|
@ -64,12 +64,6 @@
|
|||
assert_equals(pc.iceConnectionState, 'new');
|
||||
}, 'Initial iceConnectionState should be new');
|
||||
|
||||
test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
pc.close();
|
||||
assert_equals(pc.iceConnectionState, 'closed');
|
||||
}, 'Closing the connection should set iceConnectionState to closed');
|
||||
|
||||
/*
|
||||
4.4.4 RTCIceConnectionState Enum
|
||||
checking
|
||||
|
@ -112,35 +106,6 @@
|
|||
const pc1 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc1.close());
|
||||
const pc2 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc2.close());
|
||||
|
||||
let had_checking = false;
|
||||
|
||||
const onIceConnectionStateChange = t.step_func(() => {
|
||||
const {iceConnectionState} = pc1;
|
||||
if (iceConnectionState === 'checking') {
|
||||
had_checking = true;
|
||||
} else if (iceConnectionState === 'connected' ||
|
||||
iceConnectionState === 'completed') {
|
||||
assert_true(had_checking, 'state should pass checking before' +
|
||||
' reaching connected or completed');
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
|
||||
pc1.createDataChannel('test');
|
||||
|
||||
pc1.addEventListener('iceconnectionstatechange', onIceConnectionStateChange);
|
||||
|
||||
exchangeIceCandidates(pc1, pc2);
|
||||
doSignalingHandshake(pc1, pc2);
|
||||
}, 'connection with one data channel should eventually have connected or ' +
|
||||
'completed connection state');
|
||||
|
||||
async_test(t => {
|
||||
const pc1 = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc1.close());
|
||||
const pc2 = new RTCPeerConnection();
|
||||
|
||||
t.add_cleanup(() => pc2.close());
|
||||
|
||||
|
@ -151,22 +116,19 @@ async_test(t => {
|
|||
const iceTransport = pc1.sctp.transport.transport;
|
||||
|
||||
assert_equals(iceTransport.state, 'checking',
|
||||
'Expect ICE transport to be in checking state when' +
|
||||
' iceConnectionState is checking');
|
||||
'Expect ICE transport to be in checking state when iceConnectionState is checking');
|
||||
|
||||
} else if(iceConnectionState === 'connected') {
|
||||
const iceTransport = pc1.sctp.transport.transport;
|
||||
|
||||
assert_equals(iceTransport.state, 'connected',
|
||||
'Expect ICE transport to be in connected state when' +
|
||||
' iceConnectionState is connected');
|
||||
'Expect ICE transport to be in connected state when iceConnectionState is connected');
|
||||
|
||||
} else if(iceConnectionState === 'completed') {
|
||||
const iceTransport = pc1.sctp.transport.transport;
|
||||
|
||||
assert_equals(iceTransport.state, 'completed',
|
||||
'Expect ICE transport to be in connected state when' +
|
||||
' iceConnectionState is completed');
|
||||
'Expect ICE transport to be in connected state when iceConnectionState is completed');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -179,8 +141,7 @@ async_test(t => {
|
|||
|
||||
exchangeIceCandidates(pc1, pc2);
|
||||
doSignalingHandshake(pc1, pc2);
|
||||
}, 'connection with one data channel should eventually ' +
|
||||
'have connected connection state');
|
||||
}, 'connection with one data channel should eventually have connected connection state');
|
||||
|
||||
/*
|
||||
TODO
|
||||
|
|
Загрузка…
Ссылка в новой задаче