-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1582047 [wpt PR 19132] - Clear-Site-Data: clients uncontrolled by…
… service workers, a=testonly Automatic update from web-platform-tests Clear-Site-Data: clients uncontrolled by service workers after storage directive (#19132) Adds a failing test, asserting that pages actively controlled by a service worker become uncontrolled after the Clear-Site-Data storage directive. We agreed on this behavior in a spec issue and confirmed the need for this test at the TPAC Service Workers F2F. w3c/ServiceWorker#614 F2F notes: https://docs.google.com/document/d/1_Qfw5m3BJEaL1xIzTJd41HXjgJ9gq7mroBDXqSJIzic/edit -- wpt-commits: 8be01b6e0d191a641f45ad59e83718155775921d wpt-pr: 19132 UltraBlame original commit: 8b899d0a8c9d3cff2b26f20ca5235418b65447ba
- Loading branch information
Showing
5 changed files
with
73 additions
and
2 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
3 changes: 3 additions & 0 deletions
3
testing/web-platform/tests/clear-site-data/support/controlled-endpoint.py
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,3 @@ | ||
def main(request, response): | ||
return ([("Content-Type", "text/html")], | ||
"FROM_NETWORK") |
6 changes: 6 additions & 0 deletions
6
testing/web-platform/tests/clear-site-data/support/page_using_service_worker.html
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,6 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Clear-Site-Data + Service Workers Test Page</title> | ||
</head> | ||
</html> |
7 changes: 6 additions & 1 deletion
7
testing/web-platform/tests/clear-site-data/support/service_worker.js
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 |
---|---|---|
@@ -1 +1,6 @@ | ||
|
||
self.addEventListener('fetch', (e) => { | ||
const url = new URL(e.request.url); | ||
if (url.pathname.match('controlled-endpoint.py')) { | ||
e.respondWith(new Response('FROM_SERVICE_WORKER')); | ||
} | ||
}); |
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