diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/cookies/attributes/secure.https.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/cookies/attributes/secure.https.html')
-rw-r--r-- | testing/web-platform/tests/cookies/attributes/secure.https.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/web-platform/tests/cookies/attributes/secure.https.html b/testing/web-platform/tests/cookies/attributes/secure.https.html new file mode 100644 index 0000000000..9308899694 --- /dev/null +++ b/testing/web-platform/tests/cookies/attributes/secure.https.html @@ -0,0 +1,65 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test cookie secure attribute parsing</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2.5"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/cookies/resources/cookie-test.js"></script> + </head> + <body> + <div id=log></div> + <script> + const secureTests = [ + { + cookie: "test=1; Secure", + expected: "test=1", + name: "Set cookie for Secure attribute", + }, + { + cookie: "test=2; seCURe", + expected: "test=2", + name: "Set cookie for seCURe attribute", + }, + { + cookie: "test=3; Secure=", + expected: "test=3", + name: "Set cookie for for Secure= attribute", + }, + { + cookie: "test=4; Secure=aaaa", + expected: "test=4", + name: "Set cookie for Secure=aaaa", + }, + { + cookie: "test=5; Secure =aaaaa", + expected: "test=5", + name: "Set cookie for Secure space equals", + }, + { + cookie: "test=6; Secure= aaaaa", + expected: "test=6", + name: "Set cookie for Secure equals space", + }, + { + cookie: "test=7; Secure", + expected: "test=7", + name: "Set cookie for spaced Secure", + }, + { + cookie: "test=8; Secure ;", + expected: "test=8", + name: "Set cookie for space Secure with ;", + } + ]; + + for (const test of secureTests) { + httpCookieTest(test.cookie, test.expected, test.name, test.defaultPath); + } + </script> + </body> +</html> |