Skip to content

WPT: fix overuse of PREFETCH_PROXY_BYPASS_HOST #53271

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

Several tests had copied usage of PREFETCH_PROXY_BYPASS_HOST when it was
not necessary, and instead they could work with any cross-origin or
cross-site host. Move them to using get_host_info().NOTSAMESITE_HOST
instead for this purpose. (This host had to be exposed by editing
get-host-info.sub.js.)

Rename PREFETCH_PROXY_BYPASS_HOST to
CROSS_ORIGIN_HOST_THAT_WORKS_WITH_ACIWCO ("ACIWCO" =
"anonymous-client-ip-when-cross-origin"), and add a comment about
exactly when it is to be used, plus a TODO about making this a more
official part of the web platform tests infrastructure in the future.

Notable specific test cases:

  • anonymous-client.https.html was actually testing the ACIWCO feature, so it uses CROSS_ORIGIN_HOST_THAT_WORKS_WITH_ACIWCO legitimately.

  • cross-origin-cookies.https.html was testing two things: cross-origin cookies, and the fact that if two prefetches were sent, the first with ACIWCO and the second without, then ACIWCO would apply. Split it into two tests, so that one test can focus only on cookies and the other can test the ACIWCO interaction.

  • user-pass.https.html was using ACIWCO for no reason related to the test. Stop doing so.

We thus end up with only two test files, anonymous-client.https.html and
cross-origin-cookies-anonymous-client-ip-duplicate.https.html, which
depend on ACIWCO. Future work will move these into a specific virtual
test suite.

Bug: 409806816
Change-Id: Ia7de51862e0b99ddc13bfcf71ecf4d04a2f89b02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650746
Auto-Submit: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1476054}

Several tests had copied usage of PREFETCH_PROXY_BYPASS_HOST when it was
not necessary, and instead they could work with any cross-origin or
cross-site host. Move them to using get_host_info().NOTSAMESITE_HOST
instead for this purpose. (This host had to be exposed by editing
get-host-info.sub.js.)

Rename PREFETCH_PROXY_BYPASS_HOST to
CROSS_ORIGIN_HOST_THAT_WORKS_WITH_ACIWCO ("ACIWCO" =
"anonymous-client-ip-when-cross-origin"), and add a comment about
exactly when it is to be used, plus a TODO about making this a more
official part of the web platform tests infrastructure in the future.

Notable specific test cases:

* anonymous-client.https.html was actually testing the ACIWCO feature, so it uses CROSS_ORIGIN_HOST_THAT_WORKS_WITH_ACIWCO legitimately.

* cross-origin-cookies.https.html was testing two things: cross-origin cookies, and the fact that if two prefetches were sent, the first with ACIWCO and the second without, then ACIWCO would apply. Split it into two tests, so that one test can focus only on cookies and the other can test the ACIWCO interaction.

* user-pass.https.html was using ACIWCO for no reason related to the test. Stop doing so.

We thus end up with only two test files, anonymous-client.https.html and
cross-origin-cookies-anonymous-client-ip-duplicate.https.html, which
depend on ACIWCO. Future work will move these into a specific virtual
test suite.

Bug: 409806816
Change-Id: Ia7de51862e0b99ddc13bfcf71ecf4d04a2f89b02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650746
Auto-Submit: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1476054}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

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.

3 participants