summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webrtc-encoded-transform/RTCRtpScriptTransform-bad-chunk.https.html
blob: a837f627f25edf709115407fcc7bce70dcd4f078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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>