Skip to content

Commit

Permalink
Rebase max-message-size tests, and fix max-message-size in Blink
Browse files Browse the repository at this point in the history
This also adds a WPT test that SCTP SDP syntax is correct.

Bug: chromium:943975
Change-Id: I441bd4f09de2a13f003acecc3e1ded56041a1758
  • Loading branch information
alvestrand authored and chromium-wpt-export-bot committed May 16, 2019
1 parent a44abc7 commit e05c1d2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions webrtc/protocol/sctp-format.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<meta charset=utf-8>
<title>RTCPeerconnection SDP SCTP format test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../RTCPeerConnection-helper.js"></script>
<script>
'use strict';

promise_test(async t => {
const caller = new RTCPeerConnection();
const callee = new RTCPeerConnection();
t.add_cleanup(() => caller.close());
t.add_cleanup(() => callee.close());
caller.createDataChannel('channel');
const offer = await caller.createOffer();
const [preamble, media_section, postamble] = offer.sdp.split('\r\nm=');
assert_true(typeof(postamble) === 'undefined');
assert_greater_than(media_section.search(
/^application \d+ UDP\/DTLS\/SCTP webrtc-datachannel\r\n/), -1);
assert_greater_than(media_section.search(/\r\na=sctp-port:\d+\r\n/), -1);
assert_greater_than(media_section.search(/\r\na=mid:/), -1);
}, 'Generated Datachannel SDP uses correct SCTP offer syntax');

</script>

0 comments on commit e05c1d2

Please sign in to comment.