-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic test for generated SDP #13887
Basic test for generated SDP #13887
Conversation
This adds a protocol test that SDP is generated by createOffer conforming to JSEP requirements.
// "such as" IN IP4 127.0.0.1. We do strict matching here in order | ||
// to detect if anyone ever uses something different. | ||
assert_regexp_match(offer_lines[1], /^o=- \d+ \d+ IN IP4 127.0.0.1$/); | ||
const fields = RegExp(/^o=- (\d+) (\d+)/).exec(offer_lines[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails on Firefox as it has the username field value "mozilla...THIS_IS_SDPARTA". JSEP says "The value of the <username> field SHOULD be "-"
". Since it is optional it should not result in a test failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nils-ohlmeier says that Firefox expects to change this.
SHOULD is a problem for tests; if we don't test them, will they ever be tested?
assert_regexp_match(offer_lines[1], /^o=- \d+ \d+ IN IP4 127.0.0.1$/); | ||
const fields = RegExp(/^o=- (\d+) (\d+)/).exec(offer_lines[1]); | ||
assert_less_than(Number(fields[1]), 2**62); | ||
// Note: using - in s=- is a SHOULD in JSEP, not a MUST. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should being not complying to "SHOULD" requirements in JSEP result in test failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that we should (SHOULD) do that....
There are no reviewers for this pull request besides its author. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
This adds a protocol test that SDP is generated by createOffer
conforming to JSEP requirements.