| 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 be0a3046638708677c2010b1a56aae19163f6f1b..12fefd5c91420a128dabeb7dfbf542a15063c655 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
|
| @@ -7,35 +7,41 @@ var TEST_TARGETS = [
|
| // Redirect: same origin -> same origin
|
| [REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=GET&headers=CUSTOM',
|
| - [fetchResolved, hasContentLength, hasServerHeader, hasBody, typeBasic],
|
| + [fetchResolved, hasContentLength, hasServerHeader, hasBody, typeBasic,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck2])],
|
|
|
| // Status code tests for mode="no-cors"
|
| // The 301 redirect response changes POST method to GET method.
|
| [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=301',
|
| - [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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
|
| @@ -47,33 +53,39 @@ var TEST_TARGETS = [
|
| // Redirect: other origin -> same origin
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=GET',
|
| - [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + checkURLList.bind(self, [BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck1])],
|
|
|
| // Status code tests for mode="no-cors"
|
| // The 301 redirect response MAY change the request method from POST to GET.
|
| [OTHER_REDIRECT_URL + encodeURIComponent(BASE_URL) +
|
| '&mode=no-cors&method=POST&Status=301',
|
| - [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + 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
|
| @@ -85,7 +97,8 @@ var TEST_TARGETS = [
|
| // Redirect: other origin -> same origin
|
| [OTHER_REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) +
|
| '&mode=no-cors&method=GET',
|
| - [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque],
|
| + [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque,
|
| + checkURLList.bind(self, [OTHER_BASE_URL])],
|
| onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])],
|
| ];
|
|
|
|
|