summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/cookies/resources/dropSameSiteNone.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/cookies/resources/dropSameSiteNone.py')
-rw-r--r--testing/web-platform/tests/cookies/resources/dropSameSiteNone.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/cookies/resources/dropSameSiteNone.py b/testing/web-platform/tests/cookies/resources/dropSameSiteNone.py
new file mode 100644
index 0000000000..2d0a837b5d
--- /dev/null
+++ b/testing/web-platform/tests/cookies/resources/dropSameSiteNone.py
@@ -0,0 +1,11 @@
+from cookies.resources.helpers import makeDropCookie, setNoCacheAndCORSHeaders
+
+def main(request, response):
+ """Respond to `/cookies/resources/dropSameSiteNone.py by dropping the
+ two cookies set by setSameSiteNone.py"""
+ headers = setNoCacheAndCORSHeaders(request, response)
+
+ # Expire the cookies, and return a JSON-encoded success code.
+ headers.append(makeDropCookie(b"samesite_none_insecure", False))
+ headers.append(makeDropCookie(b"samesite_none_secure", True))
+ return headers, b'{"success": true}'