| Index: LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js
|
| diff --git a/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js b/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bcd31e06f97fbdae98dbb254753b5c2286db4b64
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-data.js
|
| @@ -0,0 +1,46 @@
|
| +if (self.importScripts) {
|
| + importScripts('/fetch/resources/fetch-test-helpers.js');
|
| + importScripts('/fetch/resources/thorough-util.js');
|
| +}
|
| +
|
| +var url = "data:application/json,report({jsonpResult: 'success'});";
|
| +
|
| +var TEST_TARGETS = [
|
| +// data: requests.
|
| + [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=GET',
|
| + [fetchResolved, noContentLength, hasContentType, noServerHeader, hasBody, typeBasic],
|
| + [checkJsonpSuccess]],
|
| + [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=cors&method=GET',
|
| + [fetchResolved, noContentLength, hasContentType, noServerHeader, hasBody, typeBasic],
|
| + [checkJsonpSuccess]],
|
| + [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=no-cors&method=GET',
|
| + [fetchResolved, noContentLength, hasContentType, noServerHeader, hasBody, typeBasic],
|
| + [checkJsonpSuccess]],
|
| +
|
| +// data: requests with non-GET methods.
|
| + [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=POST',
|
| + [fetchResolved, noContentLength, hasContentType, noServerHeader, hasBody, typeBasic],
|
| + [checkJsonpSuccess]],
|
| + [BASE_URL + 'url=' + encodeURIComponent(url) + '&mode=same-origin&method=HEAD',
|
| + [fetchResolved, noContentLength, hasContentType, noServerHeader, hasBody, typeBasic],
|
| + [checkJsonpSuccess]],
|
| +
|
| +// data: requests with same-origin redirects.
|
| + [REDIRECT_URL + encodeURIComponent(url) + '&mode=same-origin&method=GET',
|
| + [fetchRejected]],
|
| + [REDIRECT_URL + encodeURIComponent(url) + '&mode=cors&method=GET',
|
| + [fetchRejected]],
|
| +
|
| +// data: requests with cross-origin redirects.
|
| + [OTHER_REDIRECT_URL + encodeURIComponent(url) +
|
| + '&mode=same-origin&method=GET&ACAOrigin=*',
|
| + [fetchRejected]],
|
| + [OTHER_REDIRECT_URL + encodeURIComponent(url) +
|
| + '&mode=cors&method=GET&ACAOrigin=*',
|
| + [fetchRejected]],
|
| +];
|
| +
|
| +if (self.importScripts) {
|
| + executeTests(TEST_TARGETS);
|
| + done();
|
| +}
|
|
|