| Index: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect-nocors.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect-nocors.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect-nocors.js
|
| index 12fefd5c91420a128dabeb7dfbf542a15063c655..6d70e84e247a357b5ed142ddfacf43566f179f9a 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect-nocors.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/redirect-nocors.js
|
| @@ -8,14 +8,14 @@ var TEST_TARGETS = [
|
| [REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=GET&headers=CUSTOM',
|
| [fetchResolved, hasContentLength, hasServerHeader, hasBody, typeBasic,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseRedirected, checkURLList.bind(self, [BASE_URL])],
|
| [methodIsGET, noCustomHeader, authCheck1]],
|
|
|
| // Redirect: same origin -> other origin
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=GET&headers=CUSTOM',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck2])],
|
|
|
| // Status code tests for mode="no-cors"
|
| @@ -23,25 +23,25 @@ var TEST_TARGETS = [
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=301',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])],
|
| // The 302 redirect response changes POST method to GET method.
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=POST',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])],
|
| // GET method must be used for 303 redirect.
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=303',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])],
|
| // The 307 redirect response doesn't change the method.
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=307',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsPOST, authCheck2])],
|
| // The 308 redirect response doesn't change the method.
|
| // FIXME: disabled due to https://crbug.com/451938
|
| @@ -54,12 +54,12 @@ var TEST_TARGETS = [
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=GET',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck1])],
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=GET&headers=CUSTOM',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck1])],
|
|
|
| // Status code tests for mode="no-cors"
|
| @@ -67,25 +67,25 @@ var TEST_TARGETS = [
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=301',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck1])],
|
| // The 302 redirect response MAY change the request method from POST to GET.
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=POST',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck1])],
|
| // GET method must be used for 303 redirect.
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=303',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck1])],
|
| // The 307 redirect response MUST NOT change the method.
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=307',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsPOST, authCheck1])],
|
| // The 308 redirect response MUST NOT change the method.
|
| // FIXME: disabled due to https://crbug.com/451938
|
| @@ -98,7 +98,7 @@ var TEST_TARGETS = [
|
| [OTHER_REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=GET',
|
| [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| - checkURLList.bind(self, [OTHER_BASE_URL])],
|
| + responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])],
|
| ];
|
|
|
|
|