summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html')
-rw-r--r--dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html b/dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html
new file mode 100644
index 0000000000..3bd08f5315
--- /dev/null
+++ b/dom/media/webrtc/tests/mochitests/test_dataChannel_dtlsVersions.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <script type="application/javascript" src="pc.js"></script>
+</head>
+<body>
+<pre id="test">
+<script type="application/javascript">
+ createHTML({
+ bug: "1284103",
+ title: "Test basic data channel audio connection for supported DTLS versions"
+ });
+
+ async function testDtlsVersion(options, version) {
+ await SpecialPowers.pushPrefEnv({
+ set: [
+ ["media.peerconnection.dtls.version.min", version],
+ ["media.peerconnection.dtls.version.max", version]
+ ]
+ });
+
+ const test = new PeerConnectionTest(options);
+ addInitialDataChannel(test.chain);
+ test.setMediaConstraints([{audio: true}], [{audio: true}]);
+
+ // This inlines test.run(), to allow for multiple tests to run.
+ test.updateChainSteps();
+ await test.chain.execute();
+ await test.close();
+ }
+
+ runNetworkTest(async (options) => {
+ // 770 = DTLS 1.0, 771 = DTLS 1.2, 772 = DTLS 1.3
+ for (var version = 770; version <= 772; version++) {
+ await testDtlsVersion(options, version);
+ }
+ networkTestFinished();
+ });
+</script>
+</pre>
+</body>
+</html>