mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Update web-platform-tests to revision be959408023fe02cf79abe70f6018598a7004a88
This commit is contained in:
parent
a76777b115
commit
761c8bc2a9
171 changed files with 2434 additions and 907 deletions
|
@ -14,7 +14,6 @@
|
|||
// generateOffer()
|
||||
// generateAnswer()
|
||||
// assert_session_desc_equals()
|
||||
// test_state_change_event()
|
||||
|
||||
/*
|
||||
4.3.2. Interface Definition
|
||||
|
@ -60,7 +59,10 @@
|
|||
*/
|
||||
promise_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
test_state_change_event(t, pc, ['have-local-offer', 'stable']);
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
||||
const states = [];
|
||||
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
|
||||
|
||||
return pc.createOffer({ offerToReceiveVideo: true })
|
||||
.then(offer =>
|
||||
|
@ -79,6 +81,8 @@
|
|||
|
||||
assert_equals(pc.pendingLocalDescription, null);
|
||||
assert_equals(pc.pendingRemoteDescription, null);
|
||||
|
||||
assert_array_equals(states, ['have-local-offer', 'stable']);
|
||||
})));
|
||||
}, 'setRemoteDescription() with valid state and answer should succeed');
|
||||
|
||||
|
@ -95,6 +99,8 @@
|
|||
promise_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
||||
return pc.createOffer()
|
||||
.then(offer =>
|
||||
promise_rejects(t, 'InvalidStateError',
|
||||
|
@ -104,6 +110,8 @@
|
|||
promise_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
||||
return pc.createOffer()
|
||||
.then(offer =>
|
||||
pc.setRemoteDescription(offer)
|
||||
|
@ -111,7 +119,6 @@
|
|||
.then(answer =>
|
||||
promise_rejects(t, 'InvalidStateError',
|
||||
pc.setRemoteDescription(answer)));
|
||||
|
||||
}, 'Calling setRemoteDescription(answer) from have-remote-offer state should reject with InvalidStateError');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue