Skip to content

Commit

Permalink
Prefetch WPTs: Remove some irrelevant anonymous-client-ip-when-cross-…
Browse files Browse the repository at this point in the history
…origin usage

Anonymization is not relevant to these tests and removing the
requirement allows the tests to run without a proxy or special test
configuration.

Bug: None
Change-Id: I25f79b7469184916267d0d1edaacbeaf34513fea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5318614
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1264772}
  • Loading branch information
kjmcnee authored and chromium-wpt-export-bot committed Feb 23, 2024
1 parent 8960484 commit da26ae6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
await agent.setReferrerPolicy("unsafe-url");

const nextURL = agent.getExecutorURL({ hostname: PREFETCH_PROXY_BYPASS_HOST, page: 2 });
await agent.forceSinglePrefetch(
nextURL, { referrer_policy: "no-referrer", requires: ["anonymous-client-ip-when-cross-origin"] });
await agent.forceSinglePrefetch(nextURL, { referrer_policy: "no-referrer" });
await agent.navigate(nextURL);

// This referring page's referrer policy would not be eligible for
Expand Down Expand Up @@ -120,8 +119,7 @@
const expectedReferrer = agent.getExecutorURL().origin + "/";

const nextURL = agent.getExecutorURL({ hostname: PREFETCH_PROXY_BYPASS_HOST, page: 2 });
await agent.forceSinglePrefetch(
nextURL, { referrer_policy: "unsafe-url", requires: ["anonymous-client-ip-when-cross-origin"] });
await agent.forceSinglePrefetch(nextURL, { referrer_policy: "unsafe-url" });
await agent.navigate(nextURL);

// This referring page's referrer policy would normally make it eligible for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@

const nextURL = agent.getExecutorURL({ hostname: PREFETCH_PROXY_BYPASS_HOST, page: 2 });
// This prefetch attempt should be ignored.
await agent.forceSinglePrefetch(
nextURL, { requires: ["anonymous-client-ip-when-cross-origin"] });
await agent.forceSinglePrefetch(nextURL);
await agent.navigate(nextURL);

const headers = await agent.getRequestHeaders();
Expand Down
3 changes: 1 addition & 2 deletions speculation-rules/prefetch/resources/ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def main(request, response):
"prefetch": [
{{
"source":"list",
"urls":["{url}?uuid={uuid}&page={page}&str={strparam}"],
"requires":["anonymous-client-ip-when-cross-origin"]
"urls":["{url}?uuid={uuid}&page={page}&str={strparam}"]
}}
]
}}
Expand Down

0 comments on commit da26ae6

Please sign in to comment.