Closed Bug 2078532 Opened 1 month ago Closed 28 days ago

[wpt-sync] Sync PR 63295 - [SAA] Fix flaky SetFirstPartyCookie WPT helper

Categories

(Core :: Privacy: Anti-Tracking, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 63295 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63295
Details from upstream follow.

Mike Taylor <miketaylr@chromium.org> wrote:

[SAA] Fix flaky SetFirstPartyCookie WPT helper

SetFirstPartyCookie() waited for the popup's
'set-document-cookie-complete' message with a listener registered using
{ once: true }. That option detaches the listener after the first
message of any kind, but the listener only resolves on the matching
message, so any unrelated message arriving while the helper is waiting
causes the returned promise to never resolve and the test to time out.

Such messages do arrive: the embedded responder frames created by these
tests load testharness.js (without testharnessreport.js), so ~10s after
each frame loads its harness times out and testharness.js posts a
{type: "complete"} message to every ancestor window. In
requestStorageAccess-cross-site-sibling-iframes, the second subtest
creates its frames before calling SetFirstPartyCookie twice, so on slow
(debug) bots the first subtest's frames hit their 10s harness timeout
exactly while the second SetFirstPartyCookie() is waiting, which removed
the listener and hung the test until the harness timeout.

Keep the listener attached until the expected message has been
processed, and only then remove it, ignoring unrelated messages.

Bug: 566580874
Change-Id: I3bdeb970f42bbd44e72c02ef438b9e45eae13a09

Reviewed-on: https://chromium-review.googlesource.com/8512297
WPT-Export-Revision: f9c891ce87b186b41a5aa2b3cb434d34f9325860

Component: web-platform-tests → Privacy: Anti-Tracking
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 124 tests and 1 subtests

Status Summary

Firefox

OK : 25[GitHub] 38[Gecko-android-em-14-x86_64-debug-geckoview] 39[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 104[Gecko-windows11-32-25h2-opt] 105[Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-opt] 107[Gecko-windows11-64-25h2-debug] 110[Gecko-linux2404-64-opt]
PASS : 115[GitHub] 126[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 129[Gecko-android-em-14-x86_64-debug-geckoview] 146[Gecko-windows11-32-25h2-debug] 149[Gecko-windows11-32-25h2-opt] 151[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 153[Gecko-windows11-64-25h2-opt] 154[Gecko-windows11-64-25h2-debug]
FAIL : 9[GitHub] 19[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 145[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 146[Gecko-windows11-32-25h2-opt] 148[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
TIMEOUT: 1[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 3[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-opt, GitHub] 4[Gecko-windows11-32-25h2-opt] 5[Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 6[Gecko-windows11-64-25h2-opt]
ERROR : 10[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 12[Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 14[Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt]
NOTRUN : 5

Chrome

OK : 27
PASS : 110
FAIL : 2

Safari

OK : 27
PASS : 104
FAIL : 23

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

  • /storage-access-api/hasStorageAccess-insecure.sub.window.html [wpt.fyi]: OK [Gecko-linux2404-64-opt], TIMEOUT [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt, GitHub]
  • /storage-access-api/requestStorageAccess-cross-origin-iframe-navigation-relax.sub.https.window.html [wpt.fyi]
    • Same-site-initiated same-origin navigations preserve storage access: FAIL
  • /storage-access-api/requestStorageAccess-insecure.sub.window.html [wpt.fyi]: OK [Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt], SKIP [Gecko-linux2404-64-debug], TIMEOUT [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt, GitHub]
    • [top-level-context] document.requestStorageAccess() should be rejected when called with a user gesture in insecure context: PASS [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug], TIMEOUT [Gecko-windows11-64-25h2-opt, GitHub]

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: