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

Side by Side Diff: LayoutTests/http/tests/fetch/script-tests/thorough/cookie-nocors.js

Issue 1267263003: Rename fetch layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
OLDNEW
1 if (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('../resources/fetch-test-helpers.js'); 2 importScripts('/fetch/resources/fetch-test-helpers.js');
3 importScripts('../resources/fetch-access-control-util.js'); 3 importScripts('/fetch/resources/thorough-util.js');
4 } 4 }
5 5
6 // This test assumes TEST_TARGETS are executed in order and sequentially. 6 // This test assumes TEST_TARGETS are executed in order and sequentially.
7 var TEST_TARGETS = []; 7 var TEST_TARGETS = [];
8 8
9 // cookieCheckX checks the cookies sent in the request. 9 // cookieCheckX checks the cookies sent in the request.
10 // SetCookie=cookieX indicates to set cookies in the response. 10 // SetCookie=cookieX indicates to set cookies in the response.
11 // So a SetCookie=cookieX indication may affect the next cookieCheckX, 11 // So a SetCookie=cookieX indication may affect the next cookieCheckX,
12 // but not the cookieCheckX in the same request. 12 // but not the cookieCheckX in the same request.
13 13
14 // Test same-origin requests. 14 // Test same-origin requests.
15 // The same set of requests are also in fetch-access-control-cookie.js, 15 // The same set of requests are also in cookie.js,
16 // with different modes (same-origin and cors). 16 // with different modes (same-origin and cors).
17 // forEach structure is left unchanged here to keep 17 // forEach structure is left unchanged here to keep
18 // fetch-access-control-cookie.js and fetch-access-control-cookie-no-cors.js 18 // cookie.js and cookie-nocors.js parallel with small diffs.
19 // parallel with small diffs.
20 ['no-cors'].forEach(function(mode) { 19 ['no-cors'].forEach(function(mode) {
21 // At first, cookie is cookie=cookie1. 20 // At first, cookie is cookie=cookie1.
22 TEST_TARGETS.push( 21 TEST_TARGETS.push(
23 // Set cookie=cookieA by credentials=same-origin. 22 // Set cookie=cookieA by credentials=same-origin.
24 [BASE_URL + 'mode=' + mode + '&credentials=same-origin&SetCookie=cookieA', 23 [BASE_URL + 'mode=' + mode + '&credentials=same-origin&SetCookie=cookieA',
25 [fetchResolved, hasBody], [cookieCheck1]], 24 [fetchResolved, hasBody], [cookieCheck1]],
26 25
27 // Set cookie=cookieB by credentials=include. 26 // Set cookie=cookieB by credentials=include.
28 [BASE_URL + 'mode=' + mode + '&credentials=include&SetCookie=cookieB', 27 [BASE_URL + 'mode=' + mode + '&credentials=include&SetCookie=cookieB',
29 [fetchResolved, hasBody], [cookieCheckA]], 28 [fetchResolved, hasBody], [cookieCheckA]],
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 [OTHER_BASE_URL + 'mode=no-cors&credentials=same-origin&SetCookie=cookieA', 74 [OTHER_BASE_URL + 'mode=no-cors&credentials=same-origin&SetCookie=cookieA',
76 [fetchResolved, noBody, typeOpaque], 75 [fetchResolved, noBody, typeOpaque],
77 onlyOnServiceWorkerProxiedTest([cookieCheckC])], 76 onlyOnServiceWorkerProxiedTest([cookieCheckC])],
78 [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckA]] 77 [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckA]]
79 ); 78 );
80 79
81 if (self.importScripts) { 80 if (self.importScripts) {
82 executeTests(TEST_TARGETS); 81 executeTests(TEST_TARGETS);
83 done(); 82 done();
84 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698