-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WPT for cookies/service worker partitioning in importScripts
Bug: 1427879 Change-Id: I20d5a74daee8f59d537472cb7836c7e576b24b5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4543752 Commit-Queue: Dylan Cutler <dylancutler@google.com> Reviewed-by: Steven Bingler <bingler@chromium.org> Cr-Commit-Position: refs/heads/main@{#1146188}
- Loading branch information
1 parent
fa1adf0
commit 9146569
Showing
6 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import json | ||
from cookies.resources import helpers | ||
|
||
from wptserve.utils import isomorphic_decode | ||
|
||
def main(request, response): | ||
headers = helpers.setNoCacheAndCORSHeaders(request, response) | ||
headers[0] = (b"Content-Type", b"text/javascript") | ||
cookies = helpers.readCookies(request) | ||
decoded_cookies = {isomorphic_decode(key): isomorphic_decode(val) for key, val in cookies.items()} | ||
return headers, 'self._cookies = [{}];\n'.format( | ||
', '.join(['"{}"'.format(name) for name in decoded_cookies.keys()])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters