Skip to content

Commit

Permalink
Workaround to deflake 3PC heuristics WPT.
Browse files Browse the repository at this point in the history
Firefox is flaky on both assertions for default 3PC access. Force-failing the test to avoid calling these flaky assertions until Firefox implements them. (We don't want to force-succeed as it will hide the test which is tentative but should be implemented.)

Bug: 326123298
Fixed: 326123298
Change-Id: Ic2bd69549a746452cea24fc9c77cec39c575bd26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5322658
Reviewed-by: Joshua Hood <[email protected]>
Commit-Queue: Anton Maliev <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1267950}
  • Loading branch information
amaliev authored and chromium-wpt-export-bot committed Mar 4, 2024
1 parent 4a4a7b8 commit 8562301
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="timeout" content="long">
<title>Window that opens a popup in a cross-site context</title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
Expand Down Expand Up @@ -26,17 +28,17 @@
}

// Verify whether third-party cookies are blocked by default.
promise_test(async () => {
const thirdPartyHttpCookie = "3P_http"
await credFetch(
`${origin}/cookies/resources/set.py?${thirdPartyHttpCookie}=foobar;` +
"Secure;Path=/;SameSite=None");
await assertHttpOriginCanAccessCookies({
if (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) {
assertThirdPartyHttpCookies({
desc: "3P fetch",
origin,
cookieNames: [thirdPartyHttpCookie],
cookieNames,
expectsCookie: false,
});
}, "3P fetch: Cross site window setting HTTP cookies");
} else {
// Default behavior for third-party cookie blocking is flaky in Firefox.
throw new AssertionError("Testing default third-party cookie blocking is not implemented in Firefox.");
}

// Open the cookies' origin in a popup to activate the heuristic.
const popupUrl = new URL(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="timeout" content="long">
<title>Verifies heuristics enabled by popup</title>
<script src="/resources/testharness.js"></script>
<script src="/common/get-host-info.sub.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="timeout" content="long">
<title>Cross-site popup</title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="timeout" content="long">
<title>Test third-party cookie heuristics</title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
Expand Down

0 comments on commit 8562301

Please sign in to comment.