Closed Bug 1846088 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 41236 - Cookie Store: Add testing for checks on path and domain length when setting cookies

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rupin Mittal <rupin@apple.com> wrote:

Cookie Store: Add testing for checks on path and domain length when setting cookies

The spec (https://wicg.github.io/cookie-store/#set-cookie-algorithm) for the Cookie-Store API dictates that in the set function, if the byte sequence length of the path (in UTF8 format) is greater than the maximum attribute value size (currently 1024 bytes according to https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size), then the promise should be rejected with a TypeError. The same is true for the domain. This patch adds testing for this check in the set function in the same file that tests other argument-related checks that the set function should be doing.

CI Results

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

Total 2 tests and 22 subtests

Status Summary

Firefox

OK : 2
FAIL: 44

Chrome

OK : 2
PASS: 44

Safari

OK : 2
FAIL: 44

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /cookie-store/cookieStore_set_arguments.https.any.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
    • cookieStore.set with positional name and value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with name and value in options: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with empty name and an '=' in value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with normal name and an '=' in value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a future Date: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a past Date: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a future timestamp: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a past timestamp: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set domain starts with ".": FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain that is not equal current host: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to a subdomain of the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to a non-domain-matching suffix of the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set default domain is null and differs from current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path set to the current directory: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path set to a subdirectory of the current directory: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set default path is /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set adds / to path that does not end with /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path that does not start with /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with get result: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set checks if the path is too long: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set checks if the domain is too long: FAIL (Chrome: PASS, Safari: FAIL)
  • /cookie-store/cookieStore_set_arguments.https.any.serviceworker.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
    • cookieStore.set with positional name and value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with name and value in options: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with empty name and an '=' in value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with normal name and an '=' in value: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a future Date: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a past Date: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a future timestamp: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with expires set to a past timestamp: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set domain starts with ".": FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain that is not equal current host: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to a subdomain of the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with domain set to a non-domain-matching suffix of the current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set default domain is null and differs from current hostname: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path set to the current directory: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path set to a subdirectory of the current directory: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set default path is /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set adds / to path that does not end with /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with path that does not start with /: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set with get result: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set checks if the path is too long: FAIL (Chrome: PASS, Safari: FAIL)
    • cookieStore.set checks if the domain is too long: FAIL (Chrome: PASS, Safari: FAIL)

Tests Disabled in Gecko Infrastructure

  • /cookie-store/cookieStore_set_arguments.https.any.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
  • /cookie-store/cookieStore_set_arguments.https.any.serviceworker.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23ab94aab85d
[wpt PR 41236] - Cookie Store: Add testing for checks on path and domain length when setting cookies, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.