WPT: fix overuse of PREFETCH_PROXY_BYPASS_HOST #53271
Open
+73
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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}