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
Implement WPT RFC 72 #28870
Implement WPT RFC 72 #28870
Conversation
Not sure why the "Azure Pipelines (tools/ unittests: macOS + Python 3.6)" check failed. I cannot see the logs for the step that purportedly failed: "Install Python packages". Closing and reopening so as to trigger CI again. |
OK CI is happy now. @foolip FYI. |
@LukeZielinski friendly ping. I'd like to start writing full WPTs for Private Network Access based on this change before Chrome 92 ships to stable. |
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.
I don't know if it would have been possible to reuse the existing servers for "public"? If the states are either "private" or "public" I would have preferred to just have one of each to cut down startup overhead.
If that's not possible, this looks fine.
@letitz I'll go ahead and review this for you. |
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.
Can this be tested? Not sure if unit tests are useful/practical, but at least one test under infrastructure/ that will prevent this from regressing would be great.
@jgraham: There are 3 possible states: @foolip: Within |
@letitz the tests in Since part of this support is in the browser setup (command line argument) I think such an end-to-end test is best, but you might be able to test it with wptserve+wptrunner unit tests, if you'd prefer. |
Got it. I'll look into writing an end-to-end test then, and fall back to some kind of unit test if that fails. Do you have pointers to other end-to-end tests within |
Well, I found The Private Network Access spec used to specify a The only way we can test this now is to check that a non-secure |
The CI thing isn't problematic; we can mark those as |
Added tests to check that the other servers nominally serve files from the WPT tree. I can add a test checking that fetches are blocked correctly, as a regression test for the command-line config part. How do I mark a test as expected to fail? |
CI passed on the basic tests. Will push integration test and run CI on it - I expect it to fail on non-Chrome browsers. |
@jgraham How do I mark a test as expected to fail for certain browsers? |
Create a file like
Then to test it's correct do something like |
I didn't test that btw so I might have got it wrong :) |
Cannot get it to fail with extra logging. Removing once more... |
Example failure:
Example success:
The main difference seems to be that in the success case all servers are started before the test session starts, whereas in the failure case the test session starts before all servers are started and we can see the lagging servers starting as the test session runs. This might be exacerbated by the larger number of servers now being started, or it might be that I forgot to plumb something that tells the test session to wait until the new servers are running. |
Ah, so we have code to check all the servers start in wptrunner. But maybe the resources/ tests don't have anything like that. |
I thought I had seen something like that somewhere, and was looking around for it. Thanks for the pointer! |
#29344 refactors the wait-for-servers code here in a way that should make it more reliable. Maybe try rebasing onto that branch and see if it fixes the problem? |
Oh, that's neat! I added a small change to the server start logic for |
OK! Tests passed 🎉. Can I merge this for now, and #29344 can provide the proper fix on top? |
Yes, happy for you to merge. |
Thanks @jgraham 🎉 |
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: #28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: #28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: #28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984}
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: #28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984}
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: web-platform-tests/wpt#28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984}
…atform tests., a=testonly Automatic update from web-platform-tests [Private Network Access] Add more web platform tests. This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: web-platform-tests/wpt#28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984} -- wpt-commits: 9d1472176bfb1976157fb9891e2e1a34011f47d3 wpt-pr: 29525
…atform tests., a=testonly Automatic update from web-platform-tests [Private Network Access] Add more web platform tests. This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: web-platform-tests/wpt#28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984} -- wpt-commits: 9d1472176bfb1976157fb9891e2e1a34011f47d3 wpt-pr: 29525
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: web-platform-tests/wpt#28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984} NOKEYCHECK=True GitOrigin-RevId: 967a01dc16ea99285cb992ca730d9161d91b81e1
This implements WPT RFC 72 support for the Blink web test runner. This draws on similar work done for wptrunner in the following WPT PR: web-platform-tests/wpt#28870 That PR taught wptserve how to run servers for http(s)-{private,public} ports and configure Chrome to treat those ports as belonging to the `private` and `public` address spaces. This CL teaches the Blink web test runner to do the same, then adds some tests verifying that. Bug: chromium:1138904 Change-Id: I7c118b64d62ac6932988ad40e370b0d7c72b56b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987794 Commit-Queue: Titouan Rigoudy <titouan@chromium.org> Auto-Submit: Titouan Rigoudy <titouan@chromium.org> Reviewed-by: Stephen McGruer <smcgruer@chromium.org> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Arthur Hemery <ahemery@chromium.org> Cr-Commit-Position: refs/heads/master@{#896984} Former-commit-id: 967a01dc16ea99285cb992ca730d9161d91b81e1
This PR defines 4 new ports:
http-private
http-public
https-private
https-public
These are used to run additional HTTP and HTTPS servers on
127.0.0.1
. These new (IP address, port) pairs are configured such that their IP address space in Chrome is overridden toprivate
andpublic
as indicated in their names. Other browsers lack the ability to configure such overrides, so they are omitted in this PR.This allows testing the Private Network Access specification more extensively than what is already in
fetch/private-network-access/
. The command-line switch has yet to land in Chromium (see https://crrev.com/c/2851238) so no tests can yet be written, but I am interested in this change getting reviewed anyway. If need be, I can wait to submit this until such tests are available, or I can write tests that expect failure.This PR is destined to supplant #28768, which was the first ill-fated attempt at implementing RFC 72, before web-platform-tests/rfcs#83 came along.