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

Unified Diff: LayoutTests/http/tests/serviceworker/navigation-redirect.html

Issue 1320023005: Set the fetch API request flags correctly for navigation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: delegated constructors Created 5 years, 3 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: LayoutTests/http/tests/serviceworker/navigation-redirect.html
diff --git a/LayoutTests/http/tests/serviceworker/navigation-redirect.html b/LayoutTests/http/tests/serviceworker/navigation-redirect.html
index a5e2ea00304abe0837c02512d3294b5a7b7b1f75..a50a4a960dae39ae1bd7c73364cc7943c5010c83 100644
--- a/LayoutTests/http/tests/serviceworker/navigation-redirect.html
+++ b/LayoutTests/http/tests/serviceworker/navigation-redirect.html
@@ -260,14 +260,11 @@ promise_test(function(t) {
// SW fetched redirect.
// SW: event.respondWith(fetch(event.request));
-// TODO(horo): When we change Request.redirect of navigation requests to
-// 'manual', the expected last URL shuold be changed. (crbug.com/510650)
-// Spec Issue: https://github.com/whatwg/fetch/issues/106
promise_test(function(t) {
return setup_environment(t).then(function() {
return test_redirect(
SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE),
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE),
+ OUT_SCOPE,
[[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OUT_SCOPE)],
[],
[]]);
@@ -277,18 +274,45 @@ promise_test(function(t) {
return setup_environment(t).then(function() {
return test_redirect(
SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1),
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1),
- [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1)], [], []]);
+ SCOPE1,
+ [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE1), SCOPE1],
+ [],
+ []]);
});
}, 'SW-fetched redirect to same-origin same-scope.');
promise_test(function(t) {
return setup_environment(t).then(function() {
return test_redirect(
SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2),
- SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2),
- [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2)], [], []]);
+ SCOPE2,
+ [[SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(SCOPE2)],
+ [SCOPE2],
+ []]);
+ });
+ }, 'SW-fetched redirect to same-origin other-scope.');
+promise_test(function(t) {
+ return setup_environment(t).then(function() {
+ return test_redirect(
+ SCOPE1 + 'sw=fetch&url=' +
+ encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE),
+ OTHER_ORIGIN_OUT_SCOPE,
+ [[SCOPE1 + 'sw=fetch&url=' +
+ encodeURIComponent(OTHER_ORIGIN_OUT_SCOPE)],
+ [],
+ []]);
+ });
+ }, 'SW-fetched redirect to other-origin out-scope.');
+promise_test(function(t) {
+ return setup_environment(t).then(function() {
+ return test_redirect(
+ SCOPE1 + 'sw=fetch&url=' + encodeURIComponent(OTHER_ORIGIN_SCOPE),
+ OTHER_ORIGIN_SCOPE,
+ [[SCOPE1 + 'sw=fetch&url=' +
+ encodeURIComponent(OTHER_ORIGIN_SCOPE)],
+ [],
+ [OTHER_ORIGIN_SCOPE]]);
});
- }, 'SW fetched redirect to same-origin other-scope.');
+ }, 'SW-fetched redirect to other-origin in-scope.');
// Opaque redirect.
// SW: event.respondWith(fetch(

Powered by Google App Engine
This is Rietveld 408576698