diff --git a/service-workers/service-worker/navigation-redirect-body.https.html b/service-workers/service-worker/navigation-redirect-body.https.html
new file mode 100644
index 00000000000000..0441c610b17978
--- /dev/null
+++ b/service-workers/service-worker/navigation-redirect-body.https.html
@@ -0,0 +1,53 @@
+
+
Service Worker: Navigation redirection must clear body
+
+
+
+
+
+
+
+
+
diff --git a/service-workers/service-worker/navigation-redirect-to-http.https.html b/service-workers/service-worker/navigation-redirect-to-http.https.html
new file mode 100644
index 00000000000000..d4d2788c5891a1
--- /dev/null
+++ b/service-workers/service-worker/navigation-redirect-to-http.https.html
@@ -0,0 +1,25 @@
+
+Service Worker: Service Worker can receive HTTP opaqueredirect response.
+
+
+
+
+
+
+
diff --git a/service-workers/service-worker/navigation-redirect.https.html b/service-workers/service-worker/navigation-redirect.https.html
index 586e9036a3e9e2..e311bb635367ac 100644
--- a/service-workers/service-worker/navigation-redirect.https.html
+++ b/service-workers/service-worker/navigation-redirect.https.html
@@ -176,7 +176,7 @@
return test_redirect(
SCOPE1 + 'url=' + encodeURIComponent(SCOPE1),
SCOPE1,
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE1)], [], []]);
+ [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE1), SCOPE1], [], []]);
});
}, 'SW-fallbacked redirect to same-origin same-scope.');
promise_test(function(t) {
@@ -184,7 +184,7 @@
return test_redirect(
SCOPE1 + 'url=' + encodeURIComponent(SCOPE2),
SCOPE2,
- [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE2)], [], []]);
+ [[SCOPE1 + 'url=' + encodeURIComponent(SCOPE2)], [SCOPE2], []]);
});
}, 'SW-fallbacked redirect to same-origin other-scope.');
promise_test(function(t) {
@@ -204,7 +204,7 @@
OTHER_ORIGIN_SCOPE,
[[SCOPE1 + 'url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE)],
[],
- []]);
+ [OTHER_ORIGIN_SCOPE]]);
});
}, 'SW-fallbacked redirect to other-origin in-scope.');
@@ -372,6 +372,16 @@
[OTHER_ORIGIN_SCOPE]]);
});
}, 'Redirect to other-origin in-scope with opaque redirect response.');
+promise_test(function(t) {
+ return setup_environment(t).then(function() {
+ return test_redirect(
+ SCOPE1 + 'sw=opaque&noLocationRedirect',
+ SCOPE1 + 'sw=opaque&noLocationRedirect',
+ [[SCOPE1 + 'sw=opaque&noLocationRedirect'],
+ [],
+ []]);
+ });
+ }, 'No location redirect response.');
// Opaque redirect passed through Cache.
// SW responds with an opaque redirectresponse from the Cache API.
@@ -445,5 +455,15 @@
},
'Redirect to other-origin in-scope with opaque redirect response which ' +
'is passed through Cache.');
+promise_test(function(t) {
+ return setup_environment(t).then(function() {
+ return test_redirect(
+ SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect',
+ SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect',
+ [[SCOPE1 + 'sw=opaqueThroughCache&noLocationRedirect'],
+ [],
+ []]);
+ });
+ }, 'No location redirect response via Cache.');