diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/shared-storage/resources | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/shared-storage/resources')
-rw-r--r-- | testing/web-platform/tests/shared-storage/resources/credentials-test-helper.py | 6 | ||||
-rw-r--r-- | testing/web-platform/tests/shared-storage/resources/verify-length-module.js | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/shared-storage/resources/credentials-test-helper.py b/testing/web-platform/tests/shared-storage/resources/credentials-test-helper.py index 81a988e358..46fc0ea6fb 100644 --- a/testing/web-platform/tests/shared-storage/resources/credentials-test-helper.py +++ b/testing/web-platform/tests/shared-storage/resources/credentials-test-helper.py @@ -13,6 +13,12 @@ def main(request, response): response.status = 200 response.headers.append(b"Content-Type", b"text/javascript") + if b"access_control_allow_credentials_header" in request.GET: + response.headers.append(b"Access-Control-Allow-Credentials", request.GET[b"access_control_allow_credentials_header"]) + + if b"access_control_allow_origin_header" in request.GET: + response.headers.append(b"Access-Control-Allow-Origin", request.GET[b"access_control_allow_origin_header"]) + if action == b"store-cookie": cookie = request.headers.get(b"Cookie", b"NO_COOKIE_HEADER") request.server.stash.put(token, cookie) diff --git a/testing/web-platform/tests/shared-storage/resources/verify-length-module.js b/testing/web-platform/tests/shared-storage/resources/verify-length-module.js new file mode 100644 index 0000000000..8ba10fbcb6 --- /dev/null +++ b/testing/web-platform/tests/shared-storage/resources/verify-length-module.js @@ -0,0 +1,18 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class VerifyLength { + async run(urls, data) { + if (data && data.hasOwnProperty('expectedLength')) { + const expectedLength = data['expectedLength']; + const actualLength = await sharedStorage.length(); + if (actualLength === expectedLength) { + return 1; + } + } + return -1; + } +} + +register('verify-length', VerifyLength); |