Commit 2ba4fb0c authored by Florent Castelli's avatar Florent Castelli Committed by Commit Bot

Fix the wpt/webrtc/RTCRtpParameters-transactionId test

The transactionId field is now required in the WebIDL, so the proper
error is now a TypeError.

Bug: 803494
Change-Id: Iaf49c2cd192b8ac99678acb74a163670f4c93893
Reviewed-on: https://chromium-review.googlesource.com/1163666
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580887}
parent e54c8923
This is a testharness.js-based test.
FAIL sender.getParameters() should return different transaction IDs for each call 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."
FAIL sender.setParameters() with transaction ID different from last getParameters() should reject with InvalidModificationError 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."
FAIL sender.setParameters() with transaction ID unset should reject with InvalidModificationError 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."
FAIL sender.setParameters() with transaction ID unset should reject with TypeError 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."
FAIL setParameters() twice with the same parameters should reject with InvalidStateError 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."
FAIL setParameters() with parameters older than last getParameters() should reject with InvalidModificationError 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."
Harness: the test ran to completion.
......
......@@ -112,9 +112,9 @@
param.transactionId = undefined;
return promise_rejects(t, 'InvalidModificationError',
return promise_rejects(t, new TypeError(),
sender.setParameters(param));
}, `sender.setParameters() with transaction ID unset should reject with InvalidModificationError`);
}, `sender.setParameters() with transaction ID unset should reject with TypeError`);
promise_test(async t => {
const pc = new RTCPeerConnection();
......
This is a testharness.js-based test.
PASS sender.getParameters() should return different transaction IDs for each call
PASS sender.setParameters() with transaction ID different from last getParameters() should reject with InvalidModificationError
FAIL sender.setParameters() with transaction ID unset should reject with InvalidModificationError assert_throws: function "function() { throw e }" threw object "TypeError: Failed to execute 'setParameters' on 'RTCRtpSender': required member transactionId is undefined." that is not a DOMException InvalidModificationError: property "code" is equal to undefined, expected 13
PASS sender.setParameters() with transaction ID unset should reject with TypeError
PASS setParameters() twice with the same parameters should reject with InvalidStateError
PASS setParameters() with parameters older than last getParameters() should reject with InvalidModificationError
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