summaryrefslogtreecommitdiffstats
path: root/dom/media/webrtc/tests/crashtests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /dom/media/webrtc/tests/crashtests
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/webrtc/tests/crashtests')
-rw-r--r--dom/media/webrtc/tests/crashtests/1770075.html8
-rw-r--r--dom/media/webrtc/tests/crashtests/1789908.html25
-rw-r--r--dom/media/webrtc/tests/crashtests/1799168.html16
-rw-r--r--dom/media/webrtc/tests/crashtests/1816708.html21
-rw-r--r--dom/media/webrtc/tests/crashtests/1821477.html16
-rw-r--r--dom/media/webrtc/tests/crashtests/crashtests.list8
-rw-r--r--dom/media/webrtc/tests/crashtests/getUserMedia-audio.html7
7 files changed, 101 insertions, 0 deletions
diff --git a/dom/media/webrtc/tests/crashtests/1770075.html b/dom/media/webrtc/tests/crashtests/1770075.html
new file mode 100644
index 0000000000..4d451216bd
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/1770075.html
@@ -0,0 +1,8 @@
+<script>
+window.addEventListener('load', () => {
+ let a = new RTCPeerConnection({}, {})
+ a.createOffer({'offerToReceiveVideo': true})
+ let b = new WeakRef(a.getTransceivers()[0])
+ setTimeout("self.close()", 200)
+})
+</script>
diff --git a/dom/media/webrtc/tests/crashtests/1789908.html b/dom/media/webrtc/tests/crashtests/1789908.html
new file mode 100644
index 0000000000..3d58d3dc6b
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/1789908.html
@@ -0,0 +1,25 @@
+<script>
+window.addEventListener('load', () => {
+ const sdp = `v=0
+o=mozilla...THIS_IS_SDPARTA-99.0 4978061689314146455 0 IN IP4 0.0.0.0
+s=-
+t=0 0
+a=fingerprint:sha-256 1D:E5:0C:97:18:43:38:3D:FF:7D:6A:BF:E3:AC:CA:70:AB:53:5A:35:95:92:4F:98:86:61:CA:5D:D5:9D:5E:41
+a=group:BUNDLE 0
+a=ice-options:trickle
+a=msid-semantic:WMS *
+m=video 9 UDP/TLS/RTP/SAVPF 120
+c=IN IP4 0.0.0.0
+a=fmtp:120 max-fs=12288;max-fr=60
+a=ice-pwd:c3a5e05023a8c38f671aef91ed1802d6
+a=ice-ufrag:91e4526d
+a=setup:actpass
+
+a=rtpmap:120 VP8/90000
+`;
+
+ let a = new RTCPeerConnection()
+ a.setRemoteDescription({sdp, type: "offer"});
+ setTimeout("self.close()", 200)
+})
+</script>
diff --git a/dom/media/webrtc/tests/crashtests/1799168.html b/dom/media/webrtc/tests/crashtests/1799168.html
new file mode 100644
index 0000000000..6c5c9db237
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/1799168.html
@@ -0,0 +1,16 @@
+<script>
+window.addEventListener('load', async () => {
+ const offerer = new RTCPeerConnection();
+ const answerer = new RTCPeerConnection();
+ offerer.addTransceiver('audio');
+ await offerer.setLocalDescription();
+ await answerer.setRemoteDescription(offerer.localDescription);
+ const answer = await answerer.createAnswer();
+ await offerer.setRemoteDescription(answer);
+ // relay candidate with TCP!
+ const candidate = 'candidate:3 1 tcp 18087935 20.253.151.225 3478 typ relay raddr 10.0.48.153 rport 3478 tcptype passive';
+ await offerer.addIceCandidate({candidate, sdpMLineIndex: 0});
+ await new Promise(r => setTimeout(r, 2000));
+ self.close();
+})
+</script>
diff --git a/dom/media/webrtc/tests/crashtests/1816708.html b/dom/media/webrtc/tests/crashtests/1816708.html
new file mode 100644
index 0000000000..c7ba824041
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/1816708.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+document.addEventListener('DOMContentLoaded', async () => {
+ const peer = new RTCPeerConnection()
+ const stream = await navigator.mediaDevices.getUserMedia({
+ video: true,
+ audio: true,
+ fake: true,
+ peerIdentity: 'name',
+ })
+ stream.getTracks().forEach((track) => peer.addTrack(track, stream))
+ const offer = await peer.createOffer({})
+ await peer.setLocalDescription(offer)
+ await peer.setRemoteDescription(offer)
+ document.documentElement.removeAttribute("class");
+})
+</script>
+</head>
+</html>
diff --git a/dom/media/webrtc/tests/crashtests/1821477.html b/dom/media/webrtc/tests/crashtests/1821477.html
new file mode 100644
index 0000000000..c37bd6bd02
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/1821477.html
@@ -0,0 +1,16 @@
+<html class="reftest-wait">
+<script>
+document.addEventListener("DOMContentLoaded", async () => {
+ SpecialPowers.wrap(document).notifyUserGestureActivation();
+ try {
+ (await navigator.mediaDevices.getDisplayMedia({
+ "video": {
+ "frameRate": 2147483647,
+ },
+ })).stop();
+ } finally {
+ document.documentElement.removeAttribute("class");
+ }
+});
+</script>
+</html>
diff --git a/dom/media/webrtc/tests/crashtests/crashtests.list b/dom/media/webrtc/tests/crashtests/crashtests.list
new file mode 100644
index 0000000000..2afaa4042b
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/crashtests.list
@@ -0,0 +1,8 @@
+defaults pref(media.navigator.permission.disabled,true) pref(media.devices.insecure.enabled,true) pref(media.getusermedia.insecure.enabled,true)
+
+load 1770075.html
+load 1789908.html
+load 1799168.html
+load 1816708.html
+load 1821477.html
+pref(media.navigator.permission.device,true) pref(media.audio_loopback_dev,"real-device-request-with-clear-cache") load getUserMedia-audio.html # bug 1767893
diff --git a/dom/media/webrtc/tests/crashtests/getUserMedia-audio.html b/dom/media/webrtc/tests/crashtests/getUserMedia-audio.html
new file mode 100644
index 0000000000..14b6d0d7a2
--- /dev/null
+++ b/dom/media/webrtc/tests/crashtests/getUserMedia-audio.html
@@ -0,0 +1,7 @@
+<html class="reftest-wait">
+<script>
+ navigator.mediaDevices.getUserMedia({ audio: true }).finally(() => {
+ document.documentElement.removeAttribute("class");
+ });
+</script>
+</html>