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

Side by Side Diff: LayoutTests/http/tests/fetch/script-tests/fetch-access-control-redirect-loop.js

Issue 921673003: [Fetch] Split layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 if (self.importScripts) {
2 importScripts('../resources/fetch-test-helpers.js');
3 importScripts('/serviceworker/resources/fetch-access-control-util.js');
4 }
5
6 var TEST_TARGETS = [
7 // Redirect loop: same origin -> same origin
8 [REDIRECT_LOOP_URL + encodeURIComponent(BASE_URL) + '&Count=20&mode=cors',
9 [fetchResolved, hasContentLength, hasBody, typeBasic],
10 [methodIsGET, authCheck1]],
11 [REDIRECT_LOOP_URL + encodeURIComponent(BASE_URL) + '&Count=21&mode=cors',
12 [fetchRejected]],
13
14 // Redirect loop: same origin -> other origin
15 [REDIRECT_LOOP_URL + encodeURIComponent(OTHER_BASE_URL + '&ACAOrigin=*') +
16 '&Count=20&mode=cors&method=GET',
17 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
18 [methodIsGET, authCheckNone]],
19 // FIXME: due to the current implementation of Chromium,
20 // Count=21 is resolved, Count=22 is rejected.
21 // https://crbug.com/353768
22 [REDIRECT_LOOP_URL + encodeURIComponent(OTHER_BASE_URL + '&ACAOrigin=*') +
23 '&Count=22&mode=cors&method=GET',
24 [fetchRejected]],
25
26 // Redirect loop: other origin -> same origin
27 [OTHER_REDIRECT_LOOP_URL + encodeURIComponent(BASE_URL + 'ACAOrigin=*') +
28 '&Count=20&mode=cors&method=GET&ACAOrigin=*',
29 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
30 [methodIsGET, authCheckNone]],
31 [OTHER_REDIRECT_LOOP_URL + encodeURIComponent(BASE_URL + 'ACAOrigin=*') +
32 '&Count=21&mode=cors&method=GET&ACAOrigin=*',
33 [fetchRejected]],
34
35 // Redirect loop: other origin -> other origin
36 [OTHER_REDIRECT_LOOP_URL +
37 encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*') +
38 '&Count=20&mode=cors&method=GET&ACAOrigin=*',
39 [fetchResolved, noContentLength, noServerHeader, hasBody, typeCors],
40 [methodIsGET, authCheckNone]],
41 [OTHER_REDIRECT_LOOP_URL +
42 encodeURIComponent(OTHER_BASE_URL + 'ACAOrigin=*') +
43 '&Count=21&mode=cors&method=GET&ACAOrigin=*',
44 [fetchRejected]],
45 ];
46
47 if (self.importScripts) {
48 executeTests(TEST_TARGETS);
49 done();
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698