diff options
Diffstat (limited to 'testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html')
-rw-r--r-- | testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html b/testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html new file mode 100644 index 0000000000..a837f627f2 --- /dev/null +++ b/testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src ="routines.js"></script> + +<video id="video1" autoplay></video> + +<script> +promise_test(async (test) => { + const {sender, receiver, senderPc, receiverPc} = await createConnectionWithTransform(test, 'RTCRtpScriptTransform-bad-chunk-worker.js', {audio: true}); + + assert_array_equals(await getNextMessage(sender.transform.port), ["TypeError", "null"]); + assert_array_equals(await getNextMessage(sender.transform.port), ["TypeError", "RTCEncodedAudioFrame"]); +}, "Writing bad chunks should error the stream"); +</script> |