0

webrtc wpt: remove test_state_change_event

removes test_state_change_event which initiates a "subtest" using
a shared peerconnection resource.

BUG=836871

Change-Id: I692bb5826c83d0d36d4169858ab2872d41c03b30
Reviewed-on: https://chromium-review.googlesource.com/1074696
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562844}
This commit is contained in:
Philipp Hancke
2018-05-30 15:43:04 +00:00
committed by Commit Bot
parent af9b385130
commit e8832df879
24 changed files with 101 additions and 86 deletions

@@ -3369,12 +3369,8 @@ crbug.com/626703 external/wpt/wasm/wasm_local_iframe_test.html [ Failure ]
crbug.com/626703 external/wpt/wasm/wasm_serialization_tests.html [ Failure ]
crbug.com/626703 external/wpt/wasm/wasm_service_worker_test.https.html [ Failure ]
crbug.com/626703 external/wpt/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html [ Timeout ]
crbug.com/626703 external/wpt/webrtc/RTCPeerConnection-setLocalDescription-rollback.html [ Timeout ]
crbug.com/626703 virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-setLocalDescription-rollback.html [ Timeout ]
crbug.com/626703 external/wpt/webrtc/RTCPeerConnection-setRemoteDescription.html [ Pass Failure ]
crbug.com/626703 virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-setRemoteDescription.html [ Pass Failure ]
crbug.com/626703 external/wpt/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html [ Timeout ]
crbug.com/626703 virtual/webrtc-wpt-unified-plan/external/wpt/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html [ Timeout ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up.html [ Failure ]

@@ -6,6 +6,5 @@ FAIL When media stream is added when createOffer() is running in parallel, the r
FAIL createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers assert_equals: Expect audio line to remain in created offer expected 1 but got 0
FAIL createOffer() with offerToReceiveVideo should add video line to all subsequent created offers assert_equals: Expect video line to remain in created offer expected 1 but got 0
FAIL createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line assert_equals: Expect audio line to remain in created offer expected 1 but got 0
PASS Test onsignalingstatechange event for createOffer() and then setLocalDescription() should succeed
Harness: the test ran to completion.

@@ -15,7 +15,6 @@
// generateAnswer()
// countAudioLine()
// countVideoLine()
// test_state_change_event()
// assert_session_desc_equals()
/*
@@ -43,7 +42,9 @@
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveAudio: true })
.then(offer =>
@@ -53,6 +54,8 @@
assert_session_desc_equals(pc.localDescription, offer);
assert_session_desc_equals(pc.pendingLocalDescription, offer);
assert_equals(pc.currentLocalDescription, null);
assert_array_equals(states, ['have-local-offer']);
}));
}, 'createOffer() and then setLocalDescription() should succeed');

@@ -168,36 +168,6 @@ function generateAnswer(offer) {
.then(() => pc.createAnswer());
}
// Wait for peer connection to fire onsignalingstatechange
// event, compare and make sure the new state is the same
// as expected state. It accepts an RTCPeerConnection object
// and an array of expected state changes. The test passes
// if all expected state change events have been fired, and
// fail if the new state is different from the expected state.
//
// Note that the promise is never resolved if no change
// event is fired. To avoid confusion with the main test
// getting timed out, this is done in parallel as a separate
// test
function test_state_change_event(parentTest, pc, expectedStates) {
return async_test(t => {
pc.onsignalingstatechange = t.step_func(() => {
if(expectedStates.length === 0) {
return;
}
const newState = pc.signalingState;
const expectedState = expectedStates.shift();
assert_equals(newState, expectedState, 'New signaling state is different from expected.');
if(expectedStates.length === 0) {
t.done();
}
});
}, `Test onsignalingstatechange event for ${parentTest.name}`);
}
// Run a test function that return a promise that should
// never be resolved. For lack of better options,
// we wait for a time out and pass the test if the

@@ -4,6 +4,5 @@ FAIL setLocalDescription() with type answer and null sdp should use lastAnswer g
PASS setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError
PASS Calling setLocalDescription(answer) from stable state should reject with InvalidStateError
PASS Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError
PASS Test onsignalingstatechange event for setLocalDescription() with valid answer should succeed
Harness: the test ran to completion.

@@ -14,7 +14,6 @@
// generateOffer
// generateAnswer
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -61,7 +60,9 @@
*/
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-remote-offer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -79,6 +80,8 @@
assert_equals(pc.pendingLocalDescription, null);
assert_equals(pc.pendingRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer', 'stable']);
})));
}, 'setLocalDescription() with valid answer should succeed');

@@ -1,7 +1,5 @@
This is a testharness.js-based test.
FAIL Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
FAIL Switching role from answerer to offerer after going back to stable state should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS Test onsignalingstatechange event for Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed
PASS Test onsignalingstatechange event for Switching role from answerer to offerer after going back to stable state should succeed
Harness: the test ran to completion.

@@ -4,7 +4,5 @@ FAIL setLocalDescription with type offer and null sdp should use lastOffer gener
PASS setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError
FAIL Set created offer other than last offer should reject with InvalidModificationError assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL Creating and setting offer multiple times should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS Test onsignalingstatechange event for setLocalDescription with valid offer should succeed
PASS Test onsignalingstatechange event for Creating and setting offer multiple times should succeed
Harness: the test ran to completion.

@@ -14,7 +14,6 @@
// generateOffer
// assert_session_desc_not_equals
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -58,7 +57,9 @@
*/
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveAudio: true })
.then(offer =>
@@ -68,6 +69,8 @@
assert_session_desc_equals(pc.localDescription, offer);
assert_session_desc_equals(pc.pendingLocalDescription, offer);
assert_equals(pc.currentLocalDescription, null);
assert_array_equals(states, ['have-local-offer']);
}));
}, 'setLocalDescription with valid offer should succeed');
@@ -126,8 +129,8 @@
promise_test(t => {
const pc = new RTCPeerConnection();
// Only one state change event should be fired
test_state_change_event(t, pc, ['have-local-offer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveAudio: true })
.then(offer1 =>
@@ -142,6 +145,8 @@
assert_session_desc_equals(pc.localDescription, offer2);
assert_session_desc_equals(pc.pendingLocalDescription, offer2);
assert_equals(pc.currentLocalDescription, null);
assert_array_equals(states, ['have-local-offer']);
}))));
}, 'Creating and setting offer multiple times should succeed');

@@ -3,8 +3,5 @@ FAIL setLocalDescription(pranswer) from stable state should reject with InvalidS
FAIL setLocalDescription(pranswer) should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS setLocalDescription(pranswer) can be applied multiple times while still in have-local-pranswer
FAIL setLocalDescription(answer) from have-local-pranswer state should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS Test onsignalingstatechange event for setLocalDescription(pranswer) should succeed
PASS Test onsignalingstatechange event for setLocalDescription(pranswer) can be applied multiple times while still in have-local-pranswer
PASS Test onsignalingstatechange event for setLocalDescription(answer) from have-local-pranswer state should succeed
Harness: the test ran to completion.

@@ -14,7 +14,6 @@
// generateOffer
// generateAnswer
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -81,7 +80,9 @@
*/
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-remote-offer', 'have-local-pranswer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -103,13 +104,17 @@
assert_equals(pc.currentLocalDescription, null);
assert_equals(pc.pendingRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer', 'have-local-pranswer']);
});
}));
}, 'setLocalDescription(pranswer) should succeed');
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-remote-offer', 'have-local-pranswer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -119,13 +124,18 @@
const pranswer = { type: 'pranswer', sdp: answer.sdp };
return pc.setLocalDescription(pranswer)
.then(() => pc.setLocalDescription(pranswer));
.then(() => pc.setLocalDescription(pranswer))
.then(() => {
assert_array_equals(states, ['have-remote-offer', 'have-local-pranswer']);
});
}));
}, 'setLocalDescription(pranswer) can be applied multiple times while still in have-local-pranswer');
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-remote-offer', 'have-local-pranswer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -146,6 +156,8 @@
assert_equals(pc.pendingLocalDescription, null);
assert_equals(pc.pendingRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer', 'have-local-pranswer', 'stable']);
});
}));
}, 'setLocalDescription(answer) from have-local-pranswer state should succeed');

@@ -0,0 +1,7 @@
This is a testharness.js-based test.
FAIL setLocalDescription(rollback) from have-local-offer state should reset back to stable state assert_equals: expected (object) null but got (undefined) undefined
FAIL setLocalDescription(rollback) from stable state should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "TypeError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11
FAIL setLocalDescription(rollback) after setting answer description should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "TypeError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11
FAIL setLocalDescription(rollback) should ignore invalid sdp content and succeed promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType."
Harness: the test ran to completion.

@@ -12,7 +12,6 @@
// The following helper functions are called from RTCPeerConnection-helper.js:
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -59,7 +58,8 @@
promise_test(t=> {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer()
.then(offer => pc.setLocalDescription(offer))
@@ -76,6 +76,8 @@
assert_equals(pc.localDescription, null);
assert_equals(pc.pendingLocalDescription, null);
assert_equals(pc.currentLocalDescription, null);
assert_array_equals(states, ['have-local-offer', 'stable']);
});
}, 'setLocalDescription(rollback) from have-local-offer state should reset back to stable state');

@@ -14,7 +14,6 @@
// generateOffer
// assert_session_desc_not_equals
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -46,7 +45,9 @@
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'stable', 'have-local-offer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveAudio: true })
.then(offer1 =>
@@ -65,13 +66,16 @@
assert_session_desc_equals(pc.localDescription, offer2);
assert_session_desc_equals(pc.currentLocalDescription, offer1);
assert_session_desc_equals(pc.pendingLocalDescription, offer2);
assert_array_equals(states, ['have-local-offer', 'stable', 'have-local-offer']);
})));
}, 'Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed');
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc,
['have-remote-offer', 'stable', 'have-local-offer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return generateOffer({ pc, data: true })
.then(offer => pc.setRemoteDescription(offer))
@@ -86,6 +90,8 @@
assert_session_desc_equals(pc.localDescription, offer);
assert_session_desc_equals(pc.currentLocalDescription, answer);
assert_session_desc_equals(pc.pendingLocalDescription, offer);
assert_array_equals(states, ['have-remote-offer', 'stable', 'have-local-offer']);
})));
}, 'Switching role from answerer to offerer after going back to stable state should succeed');

@@ -2,6 +2,5 @@ This is a testharness.js-based test.
FAIL setRemoteDescription() with valid state and answer should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS Calling setRemoteDescription(answer) from stable state should reject with InvalidStateError
PASS Calling setRemoteDescription(answer) from have-remote-offer state should reject with InvalidStateError
PASS Test onsignalingstatechange event for setRemoteDescription() with valid state and answer should succeed
Harness: the test ran to completion.

@@ -14,7 +14,6 @@
// generateOffer()
// generateAnswer()
// assert_session_desc_equals()
// test_state_change_event()
/*
4.3.2. Interface Definition
@@ -60,7 +59,9 @@
*/
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -79,6 +80,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');

@@ -4,8 +4,5 @@ FAIL setRemoteDescription multiple times should succeed assert_not_equals: Expec
FAIL setRemoteDescription multiple times with different offer should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
FAIL setRemoteDescription(offer) with invalid SDP should reject with RTCError assert_equals: Expect error detail field to set to sdp-syntax-error expected (string) "sdp-syntax-error" but got (undefined) undefined
PASS setRemoteDescription(offer) from have-local-offer state should reject with InvalidStateError
PASS Test onsignalingstatechange event for setRemoteDescription with valid offer should succeed
PASS Test onsignalingstatechange event for setRemoteDescription multiple times should succeed
PASS Test onsignalingstatechange event for setRemoteDescription multiple times with different offer should succeed
Harness: the test ran to completion.

@@ -12,7 +12,6 @@
// The following helper functions are called from RTCPeerConnection-helper.js:
// assert_session_desc_equals()
// test_state_change_event()
/*
4.3.2. Interface Definition
@@ -56,7 +55,8 @@
const pc2 = new RTCPeerConnection();
test_state_change_event(t, pc2, ['have-remote-offer']);
const states = [];
pc2.addEventListener('signalingstatechange', () => states.push(pc2.signalingState));
return pc1.createOffer()
.then(offer => {
@@ -66,6 +66,8 @@
assert_session_desc_equals(pc2.remoteDescription, offer);
assert_session_desc_equals(pc2.pendingRemoteDescription, offer);
assert_equals(pc2.currentRemoteDescription, null);
assert_equals(states, ['have-remote-offer']);
});
});
}, 'setRemoteDescription with valid offer should succeed');
@@ -76,8 +78,8 @@
const pc2 = new RTCPeerConnection();
// have-remote-offer event should only fire once
test_state_change_event(t, pc2, ['have-remote-offer']);
const states = [];
pc2.addEventListener('signalingstatechange', () => states.push(pc2.signalingState));
return pc1.createOffer()
.then(offer => {
@@ -88,6 +90,8 @@
assert_session_desc_equals(pc2.remoteDescription, offer);
assert_session_desc_equals(pc2.pendingRemoteDescription, offer);
assert_equals(pc2.currentRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer']);
});
});
}, 'setRemoteDescription multiple times should succeed');
@@ -98,8 +102,8 @@
const pc2 = new RTCPeerConnection();
// have-remote-offer event should only fire once
test_state_change_event(t, pc2, ['have-remote-offer']);
const states = [];
pc2.addEventListener('signalingstatechange', () => states.push(pc2.signalingState));
return pc1.createOffer()
.then(offer1 => {
@@ -116,6 +120,8 @@
assert_session_desc_equals(pc2.remoteDescription, offer2);
assert_session_desc_equals(pc2.pendingRemoteDescription, offer2);
assert_equals(pc2.currentRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer']);
});
});
});

@@ -3,8 +3,5 @@ PASS setRemoteDescription(pranswer) from stable state should reject with Invalid
FAIL setRemoteDescription(pranswer) from have-local-offer state should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS setRemoteDescription(pranswer) multiple times should succeed
FAIL setRemoteDescription(answer) from have-remote-pranswer state should succeed assert_not_equals: Expect session description to be defined got disallowed value undefined
PASS Test onsignalingstatechange event for setRemoteDescription(pranswer) from have-local-offer state should succeed
PASS Test onsignalingstatechange event for setRemoteDescription(pranswer) multiple times should succeed
PASS Test onsignalingstatechange event for setRemoteDescription(answer) from have-remote-pranswer state should succeed
Harness: the test ran to completion.

@@ -14,7 +14,6 @@
// generateOffer
// generateAnswer
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -80,7 +79,9 @@
*/
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'have-remote-pranswer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -100,13 +101,17 @@
assert_session_desc_equals(pc.remoteDescription, pranswer);
assert_session_desc_equals(pc.pendingRemoteDescription, pranswer);
assert_equals(pc.currentRemoteDescription, null);
assert_array_equals(states, ['have-local-offer', 'have-remote-pranswer']);
});
}));
}, 'setRemoteDescription(pranswer) from have-local-offer state should succeed');
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'have-remote-pranswer']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -116,13 +121,18 @@
const pranswer = { type: 'pranswer', sdp: answer.sdp };
return pc.setRemoteDescription(pranswer)
.then(() => pc.setRemoteDescription(pranswer));
.then(() => pc.setRemoteDescription(pranswer))
.then(() => {
assert_array_equals(states, ['have-local-offer', 'have-remote-pranswer']);
});
}));
}, 'setRemoteDescription(pranswer) multiple times should succeed');
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-local-offer', 'have-remote-pranswer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return pc.createOffer({ offerToReceiveVideo: true })
.then(offer =>
@@ -143,6 +153,8 @@
assert_session_desc_equals(pc.remoteDescription, answer);
assert_session_desc_equals(pc.currentRemoteDescription, answer);
assert_equals(pc.pendingRemoteDescription, null);
assert_array_equals(states, ['have-local-offer', 'have-remote-pranswer', 'stable']);
});
}));
}, 'setRemoteDescription(answer) from have-remote-pranswer state should succeed');

@@ -0,0 +1,6 @@
This is a testharness.js-based test.
FAIL setRemoteDescription(rollback) in have-remote-offer state should revert to stable state Cannot read property 'createDataChannel' of undefined
FAIL setRemoteDescription(rollback) from stable state should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "TypeError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." that is not a DOMException InvalidStateError: property "code" is equal to undefined, expected 11
FAIL setRemoteDescription(rollback) should ignore invalid sdp content and succeed promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType."
Harness: the test ran to completion.

@@ -13,7 +13,6 @@
// The following helper functions are called from RTCPeerConnection-helper.js:
// generateOffer
// assert_session_desc_equals
// test_state_change_event
/*
4.3.2. Interface Definition
@@ -60,7 +59,8 @@
promise_test(t => {
const pc = new RTCPeerConnection();
test_state_change_event(t, pc, ['have-remote-offer', 'stable']);
const states = [];
pc.addEventListener('signalingstatechange', () => states.push(pc.signalingState));
return generateOffer({ data: true })
.then(offer => pc.setRemoteDescription(offer))
@@ -77,6 +77,8 @@
assert_equals(pc.remoteDescription, null);
assert_equals(pc.pendingRemoteDescription, null);
assert_equals(pc.currentRemoteDescription, null);
assert_array_equals(states, ['have-remote-offer', 'stable']);
});
}, 'setRemoteDescription(rollback) in have-remote-offer state should revert to stable state');

@@ -6,6 +6,5 @@ FAIL When media stream is added when createOffer() is running in parallel, the r
PASS createOffer() with offerToReceiveAudio should add audio line to all subsequent created offers
PASS createOffer() with offerToReceiveVideo should add video line to all subsequent created offers
PASS createOffer() with offerToReceiveAudio:true then offerToReceiveVideo:true should have result offer with both audio and video line
PASS Test onsignalingstatechange event for createOffer() and then setLocalDescription() should succeed
Harness: the test ran to completion.

@@ -4,6 +4,5 @@ FAIL setLocalDescription() with type answer and null sdp should use lastAnswer g
PASS setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError
FAIL Calling setLocalDescription(answer) from stable state should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "OperationError: Failed to set local answer sdp: Called in wrong state: kStable" that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
FAIL Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidStateError assert_throws: function "function() { throw e }" threw object "OperationError: Failed to set local answer sdp: Called in wrong state: kHaveLocalOffer" that is not a DOMException InvalidStateError: property "code" is equal to 0, expected 11
PASS Test onsignalingstatechange event for setLocalDescription() with valid answer should succeed
Harness: the test ran to completion.