gstreamer/webrtc/check/validate/scenarios/open_data_channel.scenario
Matthew Waters 615813ef93 check/validate: a few more tests and improvements
Tests a matrix of options:
- local/remote negotiation initiator
- 'most' bundle-policy combinations (some combinations will never work)
- firefox or chrome browser

Across 4 test scenarios:
- simple negotiation with default browser streams (or none if gstreamer
  initiates)
- sending a vp8 stream
- opening a data channel
- sending a message over the data channel

for a total of 112 tests!
2020-05-06 06:01:57 +00:00

23 lines
1.1 KiB
Text

description, summary="Open a data channel"
include,location=negotiation_initiator.scenario
include,location=bundle_policy.scenario
set-webrtc-options, local-bundle-policy="$(local_bundle_policy)", remote-bundle-policy="$(remote_bundle_policy)"
# add the channel on the initiator so that datachannel is added to the sdp
add-data-channel, which="$(negotiation_initiator)", id="gstreamer";
# negotiate
create-offer, which="$(negotiation_initiator)";
wait-for-negotiation-state, which="$(negotiation_responder)", state="offer-set"
create-answer, which="$(negotiation_responder)";
wait-for-negotiation-state, which="$(negotiation_initiator)", state="answer-set"
# ensure data channel is created
wait-for-data-channel, which="$(negotiation_responder)", id="gstreamer";
wait-for-data-channel, which="$(negotiation_initiator)", id="gstreamer";
wait-for-data-channel-state, which="$(negotiation_initiator)", id="gstreamer", state="open";
# only the browser closing works at the moment
close-data-channel, which="remote", id="gstreamer"
wait-for-data-channel-state, which="local", id="gstreamer", state="closed";