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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/img-crossorigin-cookies.html

Issue 2125523003: Rename setAlwaysAcceptCookies to setBlockThirdPartyCookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Check request cookies for image resources with crossOrigin.</title> 2 <title>Check request cookies for image resources with crossOrigin.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="../resources/get-host-info.js?pipe=sub"></script> 5 <script src="../resources/get-host-info.js?pipe=sub"></script>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner)
8 testRunner.setAlwaysAcceptCookies(true); 8 testRunner.setBlockThirdPartyCookies(false);
9 9
10 10
11 function load_image(url, cross_origin) { 11 function load_image(url, cross_origin) {
12 return new Promise(function(resolve, reject) { 12 return new Promise(function(resolve, reject) {
13 var img = document.createElement('img'); 13 var img = document.createElement('img');
14 document.body.appendChild(img); 14 document.body.appendChild(img);
15 img.onload = resolve; 15 img.onload = resolve;
16 img.onerror = reject; 16 img.onerror = reject;
17 if (cross_origin != '') { 17 if (cross_origin != '') {
18 img.crossOrigin = cross_origin; 18 img.crossOrigin = cross_origin;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 load_image( 72 load_image(
73 REMOTE_RESOURCES_PATH + 'abe-allow-credentials.php?' + 73 REMOTE_RESOURCES_PATH + 'abe-allow-credentials.php?' +
74 'Cookie=cross', 74 'Cookie=cross',
75 'use-credentials'), 75 'use-credentials'),
76 'Cross-origin request for a resource whose CORS setting is ' + 76 'Cross-origin request for a resource whose CORS setting is ' +
77 'UseCredentials must contain cookies.'), 77 'UseCredentials must contain cookies.'),
78 ]);} 78 ]);}
79 ); 79 );
80 }, 'Check request cookies for image resources with crossOrigin.'); 80 }, 'Check request cookies for image resources with crossOrigin.');
81 </script> 81 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698