Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1293)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html

Issue 2763123002: Upstream service worker `claim` tests to WPT (Closed)
Patch Set: Persist Chromium-specific version of test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html
deleted file mode 100644
index edaa02e5dd137b8000e53feeed9fca3fd118b72e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../resources/test-helpers.js"></script>
-<script src="../../resources/get-host-info.js"></script>
-<body>
-<script>
-var host_info = get_host_info();
-
-function send_result(result) {
- window.parent.postMessage({message: result},
- host_info['HTTP_ORIGIN']);
-}
-
-function executeTask(params) {
- // Execute task for each parameter
- if (params.has('register')) {
- var worker_url = decodeURIComponent(params.get('register'));
- var scope = decodeURIComponent(params.get('scope'));
- navigator.serviceWorker.register(worker_url, {scope: scope})
- .then(r => send_result('registered'));
- } else if (params.has('redirected')) {
- send_result('redirected');
- } else if (params.has('update')) {
- var scope = decodeURIComponent(params.get('update'));
- navigator.serviceWorker.getRegistration(scope)
- .then(r => r.update())
- .then(() => send_result('updated'));
- } else if (params.has('unregister')) {
- var scope = decodeURIComponent(params.get('unregister'));
- navigator.serviceWorker.getRegistration(scope)
- .then(r => r.unregister())
- .then(succeeded => {
- if (succeeded) {
- send_result('unregistered');
- } else {
- send_result('failure: unregister');
- }
- });
- } else {
- send_result('unknown parameter: ' + params.toString());
- }
-}
-
-var params = new URLSearchParams(location.search.slice(1));
-executeTask(params);
-</script>
-</body>

Powered by Google App Engine
This is Rietveld 408576698