Skip to content
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

webrtc: Test legacy offerToReceiveAudio/Video options #8450

Merged
merged 6 commits into from
Dec 18, 2017

Conversation

adam-be
Copy link
Contributor

@adam-be adam-be commented Nov 27, 2017

No description provided.

@ghost
Copy link

ghost commented Nov 27, 2017

Build PASSED

Started: 2017-12-15 09:24:52
Finished: 2017-12-15 09:28:23

View more information about this build on:

@alvestrand
Copy link
Contributor

I think this won't pass on Chrome (no transceivers), but does it "work" at least to the point where the test is parsed and calls the functions that it should?
What are the results on other browsers?

@snuggs
Copy link
Contributor

snuggs commented Nov 27, 2017

@alvestrand ref to no transceivers? Or is this wpt related? Would like to get versed.

@adam-be
Copy link
Contributor Author

adam-be commented Nov 28, 2017

It won't pass on Chrome (nor Firefox), but from what I see that's the case for all transceiver related tests.

@snuggs, transceivers are part of the spec, but not yet widely implemented.

@snuggs
Copy link
Contributor

snuggs commented Nov 28, 2017

Copy that @adam-be! That's all I needed to know to start digging.

snuggs
snuggs previously requested changes Nov 28, 2017
Copy link
Contributor

@snuggs snuggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall well done. Others may want to chime in on this but I encourage a help link to the appropriate spec. This allows contributors who may not be explicitly versed in the particular area of the spec.
This removes the need for questions like following to be answered after PR is merged. #8450 (comment)

My 2 Satoshi.

@@ -0,0 +1,85 @@
<!doctype html>
<meta charset=utf-8>
<title>Test legacy offerToReceiveAudio/Video options</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alvestrand what are our conventions for adding author & help meta tags? I have noticed this convention sprinkled throughout the wpt repo (primarily within css subset). I actually wish there were more references especially to the respective spec.

Examples

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea about the convention for meta tags, I've not used them; this should have recommendations at the WPT project level - @foolip may want to comment, but that shouldn't block this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that shouldn't block this PR @alvestrand
Agreed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add it if you find it useful. Myself, I never add author info because it's in git history, and add spec links only if the path and filename doesn't have all the info you need, which is often the case.

@adam-be
Copy link
Contributor Author

adam-be commented Nov 28, 2017

Thanks for reviewing. I've added a help link.

I guess with our new "test as you commit" approach there will be situations where a test can't be linked to a section in a publicly available spec since the only place the correct section exists, is in pending PR.

Copy link
Contributor

@alvestrand alvestrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I think this tests the existing spec, so should be submitted without waiting for anything. In my opinion, tests that test changes not committed to the spec should be committed when the change to the spec is committed - there may be more opinions on that.

@@ -0,0 +1,85 @@
<!doctype html>
<meta charset=utf-8>
<title>Test legacy offerToReceiveAudio/Video options</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea about the convention for meta tags, I've not used them; this should have recommendations at the WPT project level - @foolip may want to comment, but that shouldn't block this PR.

@adam-be
Copy link
Contributor Author

adam-be commented Nov 28, 2017

In my opinion, tests that test changes not committed to the spec should be committed when the change to the spec is committed - there may be more opinions on that.

Sounds reasonable to me.

@jan-ivar
Copy link
Member

So I ran this test in Firefox Nightly (which supports transceivers now), and found a problem: The logic around "stopped" looks flipped.

offerToReceiveAudio option should be ignored if a stopped "sendrecv" transceiver exists

Expected PASS, got FAIL
assert_equals: Expect pc to still have one transceiver expected 1 but got 2
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:60:9
promise callback*@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:58:14
Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
promise callback*promise_test@http://web-platform.test:8000/resources/testharness.js:539:31
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:46:5
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:11:3

offerToReceiveAudio option should be ignored if a stopped "recvonly" transceiver exists

Expected PASS, got FAIL
assert_equals: Expect pc to still have one transceiver expected 1 but got 2
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:80:9
promise callback*@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:78:14
Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
promise callback*promise_test@http://web-platform.test:8000/resources/testharness.js:539:31
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:65:5
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:11:3

offerToReceiveVideo option should be ignored if a stopped "sendrecv" transceiver exists

Expected PASS, got FAIL
assert_equals: Expect pc to still have one transceiver expected 1 but got 2
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:60:9
promise callback*@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:58:14
Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
promise_test/tests.promise_tests<@http://web-platform.test:8000/resources/testharness.js:543:27
promise callback*promise_test@http://web-platform.test:8000/resources/testharness.js:539:31
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:46:5
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:11:3

offerToReceiveVideo option should be ignored if a stopped "recvonly" transceiver exists

Expected PASS, got FAIL
assert_equals: Expect pc to still have one transceiver expected 1 but got 2
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:80:9
promise callback*@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:78:14
Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1489:20
promise_test/tests.promise_tests<@http://web-platform.test:8000/resources/testharness.js:543:27
promise callback*promise_test@http://web-platform.test:8000/resources/testharness.js:539:31
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:65:5
@http://web-platform.test:8000/webrtc/RTCPeerConnection-createOffer-offerToReceive.html:11:3

@adam-be
Copy link
Contributor Author

adam-be commented Dec 4, 2017

@jan-ivar, that was my mistake. I've updated the test now and it's all green in Firefox nightly. :)

@adam-be
Copy link
Contributor Author

adam-be commented Dec 4, 2017

@snuggs, do you believe that your comments above have been addressed?

}, `offerToReceive${capsType} option should be ignored if a non-stopped "sendrecv" transceiver exists`);
});

promise_test(t => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace nit: indent 2 spaces?
can fix when adding tests for w3c/webrtc-pc#1693

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@adam-be
Copy link
Contributor Author

adam-be commented Dec 14, 2017

It would be great to merge this PR since we want to base additional tests on it. @snuggs and @foolip, are you happy with the current state of the PR?

return getTrackFromUserMedia(type)
.then(([track, stream]) => {
pc.addTrack(track, stream);
pc.createOffer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True; will fix.

@alvestrand
Copy link
Contributor

@snuggs your review is blocking this merge, and was (I think) addressed ~20 days ago. Can you unblock?

@foolip foolip dismissed snuggs’s stale review December 18, 2017 14:31

Already addressed

@alvestrand alvestrand merged commit 07b32f0 into web-platform-tests:master Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants