Skip to content

Commit

Permalink
Bug 1903761 [wpt PR 46840] - Add tests for if codec info surfaces at …
Browse files Browse the repository at this point in the history
…the right time., a=testonly

Automatic update from web-platform-tests
Add tests for if codec info surfaces at the right time.

In support of landing this spec PR:
w3c/webrtc-pc#2972

Bug: None
Change-Id: I698276ccf739a872d791fc0923c2725ec303fbd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5642762
Commit-Queue: Harald Alvestrand <htachromium.org>
Reviewed-by: Florent Castelli <orphischromium.org>
Cr-Commit-Position: refs/heads/main{#1317347}

--

wpt-commits: 4d7ec06c827c841bfe9090a92521de6a2fb265cf
wpt-pr: 46840

UltraBlame original commit: b98fa37e2e0425dbfe0f272d58e1c9e0486ec712
  • Loading branch information
marco-c committed Jul 1, 2024
1 parent 8e0c4bf commit 737d10b
Show file tree
Hide file tree
Showing 2 changed files with 732 additions and 0 deletions.
301 changes: 301 additions & 0 deletions testing/web-platform/tests/webrtc/RTCRtpReceiver-getParameters.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@
src
=
"
RTCPeerConnection
-
helper
.
js
"
>
<
/
script
>
<
script
src
=
"
RTCRtpParameters
-
helper
Expand Down Expand Up @@ -583,6 +599,291 @@
'
)
;
promise_test
(
async
t
=
>
{
const
stream
=
await
getNoiseStream
(
{
video
:
true
}
)
;
t
.
add_cleanup
(
(
)
=
>
stream
.
getTracks
(
)
.
forEach
(
track
=
>
track
.
stop
(
)
)
)
;
const
[
track
]
=
stream
.
getTracks
(
)
;
const
caller
=
new
RTCPeerConnection
(
)
;
t
.
add_cleanup
(
(
)
=
>
caller
.
close
(
)
)
;
caller
.
addTrack
(
track
)
;
const
callee
=
new
RTCPeerConnection
(
)
;
t
.
add_cleanup
(
(
)
=
>
callee
.
close
(
)
)
;
callee
.
addTrack
(
track
)
;
var
callerReceiver
=
caller
.
getTransceivers
(
)
[
0
]
.
receiver
;
assert_equals
(
callerReceiver
.
getParameters
(
)
.
codecs
.
length
0
)
;
const
offer
=
await
caller
.
createOffer
(
)
;
await
caller
.
setLocalDescription
(
offer
)
;
await
callee
.
setRemoteDescription
(
offer
)
;
var
calleeReceiver
=
callee
.
getTransceivers
(
)
[
0
]
.
receiver
;
assert_equals
(
calleeReceiver
.
getParameters
(
)
.
codecs
.
length
0
)
;
const
answer
=
await
callee
.
createAnswer
(
)
;
await
callee
.
setLocalDescription
(
answer
)
;
assert_greater_than
(
calleeReceiver
.
getParameters
(
)
.
codecs
.
length
0
"
callee
codecs
after
answer
"
)
;
await
caller
.
setRemoteDescription
(
answer
)
;
assert_greater_than
(
callerReceiver
.
getParameters
(
)
.
codecs
.
length
0
"
caller
codecs
after
answer
"
)
;
}
'
getParameters
(
)
surfaces
codecs
on
two
-
way
receiver
at
the
right
time
'
)
;
<
/
script
Expand Down
Loading

0 comments on commit 737d10b

Please sign in to comment.