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

Test webrtc/content-security-policy integration #32914

Merged
merged 6 commits into from
Apr 18, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Feb 20, 2022

...as specified in:


This is a work in progress; in particular:

  • Right now all of the "allow" tests fail with:
  ▶ ERROR [expected OK] /content-security-policy/webrtc/webrtc-allowed-nopolicy.html
  └   → Unhandled rejection: Unknown ufrag (3a846ca3)

If I silence that one rejection they pass (and the "blocked" tests still fail), but I don't know the right approach to make sure that event doesn't fire before we can handle it.

  • I'm very fuzzy on whether this is actually the right approach; right now this tries to monitor the ice agent's transitions and make sure it goes straight from new to failed, but my grasp of the intricacies of webrtc is still somewhat tenuous, so I would not be surprised if the logic for this was wrong in some critical way.

I would appreciate feedback.

cc: @jan-ivar @alvestrand @annevk @antosart

Copy link
Contributor

@antosart antosart left a comment

Choose a reason for hiding this comment

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

Sorry, I don't have enough knowledge of webrtc to review the code. Hope some of the other reviewers does.

content-security-policy/webrtc/webrtc.js Outdated Show resolved Hide resolved
@zenhack
Copy link
Contributor Author

zenhack commented Mar 7, 2022

@jan-ivar, @alvestrand, any thoughts?

@zenhack
Copy link
Contributor Author

zenhack commented Mar 18, 2022

Ping?

content-security-policy/webrtc/webrtc.js Outdated Show resolved Hide resolved
content-security-policy/webrtc/webrtc.js Outdated Show resolved Hide resolved
content-security-policy/webrtc/webrtc.js Show resolved Hide resolved
content-security-policy/webrtc/webrtc.js Outdated Show resolved Hide resolved
@jan-ivar
Copy link
Member

@zenhack That should also take care of the "Unknown ufrag" errors. Otherwise the tests look good, thanks for writing them!

zenhack and others added 4 commits March 22, 2022 01:11
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
we should be passing each candidate to the *other* pc.

Tests now behave as expected.
@zenhack
Copy link
Contributor Author

zenhack commented Mar 22, 2022

Ok, I think I have addressed everything.

@zenhack zenhack requested a review from jan-ivar March 22, 2022 05:37
content-security-policy/webrtc/webrtc.js Outdated Show resolved Hide resolved
"new" is the initial state.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
@zenhack
Copy link
Contributor Author

zenhack commented Apr 3, 2022

@annevk, @alvestrand, ping?

@zenhack
Copy link
Contributor Author

zenhack commented Apr 12, 2022

So this has one sign-off and no other comments. What is the next step?

@youennf
Copy link
Contributor

youennf commented Apr 14, 2022

LGTM as well.
It might be cool to add a test with two iframes, one being blocked and the other one not being blocked.
In any case, can we merge it as is?

@jan-ivar
Copy link
Member

jan-ivar commented Apr 14, 2022

@annevk and @antosart the WebRTC parts here look good to us. Can it be merged?

It might be cool to add a test with two iframes, one being blocked and the other one not being blocked.

That might take some more work, like postMessage between the iframes. A follow-up issue might be good for that.

@jan-ivar jan-ivar requested a review from annevk April 15, 2022 15:26
@jan-ivar
Copy link
Member

Based on and earlier comment from @antosart and @annevk's approval of the PR this is testing, I think we're good to merge.

@jan-ivar jan-ivar merged commit 0abba58 into web-platform-tests:master Apr 18, 2022
DanielRyanSmith pushed a commit to DanielRyanSmith/wpt that referenced this pull request Apr 27, 2022
…2914)

* Test webrtc/content-security-policy integration

...as specified in:

- w3c/webappsec-csp#457
- w3c/webrtc-extensions#81

* Fix typos in comment.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

* Fix ice candidate exchange in CSP webrtc tests.

we should be passing each candidate to the *other* pc.

Tests now behave as expected.

* CSP webrtc tests: listen for connection state change, not gathering.

See web-platform-tests#32914 (comment)

* CSP webrtc tests: drop unnecessary stun server.

* webrtc csp: simplify state checking

"new" is the initial state.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 16, 2022
…gration, a=testonly

Automatic update from web-platform-tests
Test webrtc/content-security-policy integration (#32914)

* Test webrtc/content-security-policy integration

...as specified in:

- w3c/webappsec-csp#457
- w3c/webrtc-extensions#81

* Fix typos in comment.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

* Fix ice candidate exchange in CSP webrtc tests.

we should be passing each candidate to the *other* pc.

Tests now behave as expected.

* CSP webrtc tests: listen for connection state change, not gathering.

See web-platform-tests/wpt#32914 (comment)

* CSP webrtc tests: drop unnecessary stun server.

* webrtc csp: simplify state checking

"new" is the initial state.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
--

wpt-commits: 0abba58602758eb8be11c38788c6f51fed2529e4
wpt-pr: 32914
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request May 25, 2022
…gration, a=testonly

Automatic update from web-platform-tests
Test webrtc/content-security-policy integration (#32914)

* Test webrtc/content-security-policy integration

...as specified in:

- w3c/webappsec-csp#457
- w3c/webrtc-extensions#81

* Fix typos in comment.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

* Fix ice candidate exchange in CSP webrtc tests.

we should be passing each candidate to the *other* pc.

Tests now behave as expected.

* CSP webrtc tests: listen for connection state change, not gathering.

See web-platform-tests/wpt#32914 (comment)

* CSP webrtc tests: drop unnecessary stun server.

* webrtc csp: simplify state checking

"new" is the initial state.

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>

Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
--

wpt-commits: 0abba58602758eb8be11c38788c6f51fed2529e4
wpt-pr: 32914
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.

6 participants