Skip to content

Commit

Permalink
Bug 1950376 [wpt PR 50929] - webrtc wpt: add test asserting the order…
Browse files Browse the repository at this point in the history
… of track events matches the SDP, a=testonly

Automatic update from web-platform-tests
webrtc wpt: add test asserting the order of track events matches the SDP

and is not dependent on the order of tracks in the MediaStream

See
  w3c/mediacapture-main#1028

Bug: None
Change-Id: I77ac10a078632bc9ae944a3254626ff30965c433
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6286091
Commit-Queue: Philipp Hancke <philipp.hanckegooglemail.com>
Reviewed-by: Harald Alvestrand <htachromium.org>
Reviewed-by: Guido Urdaneta <guidouchromium.org>
Cr-Commit-Position: refs/heads/main{#1424488}

--

wpt-commits: 436123f65ed0a64afd3aea668b8928126fb422c1
wpt-pr: 50929

UltraBlame original commit: a225ba3e9bd15af60aead9ce00df7d7070c240ad
  • Loading branch information
marco-c committed Mar 1, 2025
1 parent 59c7deb commit c72aeb9
Showing 1 changed file with 301 additions and 0 deletions.
301 changes: 301 additions & 0 deletions testing/web-platform/tests/webrtc/RTCPeerConnection-ontrack.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -2107,6 +2107,307 @@
)
)
;
promise_test
(
async
t
=
>
{
const
pc1
=
new
RTCPeerConnection
(
)
;
t
.
add_cleanup
(
(
)
=
>
pc1
.
close
(
)
)
;
const
pc2
=
new
RTCPeerConnection
(
)
;
t
.
add_cleanup
(
(
)
=
>
pc2
.
close
(
)
)
;
const
stream
=
new
MediaStream
(
)
;
const
stream2
=
new
MediaStream
(
)
;
/
/
audio
-
then
-
video
.
pc1
.
addTransceiver
(
'
audio
'
{
streams
:
[
stream
]
}
)
;
pc1
.
addTransceiver
(
'
video
'
{
streams
:
[
stream
]
}
)
;
/
/
video
-
then
-
audio
pc1
.
addTransceiver
(
'
video
'
{
streams
:
[
stream2
]
}
)
;
pc1
.
addTransceiver
(
'
audio
'
{
streams
:
[
stream2
]
}
)
;
const
tracks
=
[
]
;
pc2
.
ontrack
=
(
e
)
=
>
tracks
.
push
(
e
.
track
)
await
pc2
.
setRemoteDescription
(
await
pc1
.
createOffer
(
)
)
;
assert_equals
(
tracks
.
length
4
'
ontrack
should
have
fired
twice
'
)
;
assert_equals
(
tracks
[
0
]
.
kind
'
audio
'
'
first
ontrack
fires
with
an
audio
track
'
)
;
assert_equals
(
tracks
[
1
]
.
kind
'
video
'
'
second
ontrack
fires
with
a
video
track
'
)
;
assert_equals
(
tracks
[
2
]
.
kind
'
video
'
'
third
ontrack
fires
with
a
video
track
'
)
;
assert_equals
(
tracks
[
3
]
.
kind
'
audio
'
'
fourth
ontrack
fires
with
an
audio
track
'
)
;
}
addTransceiver
order
of
kinds
is
retained
in
ontrack
at
the
receiver
)
;
<
/
script
Expand Down

0 comments on commit c72aeb9

Please sign in to comment.