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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cookies/resources/third-party-cookie-relaxing-iframe.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 <html> 1 <html>
2 <script src="resetCookies.js"></script> 2 <script src="resetCookies.js"></script>
3 <script> 3 <script>
4 resetCookies(); 4 resetCookies();
5 5
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 8
9 window.onmessage = function(evt) 9 window.onmessage = function(evt)
10 { 10 {
(...skipping 14 matching lines...) Expand all
25 function showCookies() 25 function showCookies()
26 { 26 {
27 alert("Test stage " + stage++ + " document.cookie is: " + document.cookie); 27 alert("Test stage " + stage++ + " document.cookie is: " + document.cookie);
28 parent.window.postMessage("done", "*"); 28 parent.window.postMessage("done", "*");
29 } 29 }
30 30
31 function sendXHR(queryCommand) 31 function sendXHR(queryCommand)
32 { 32 {
33 if (window.testRunner) { 33 if (window.testRunner) {
34 // setAlwaysAcceptCookies() takes effect asynchronously (IPC is involved ). 34 // setAlwaysAcceptCookies() takes effect asynchronously (IPC is involved ).
35 testRunner.setAlwaysAcceptCookies(true); 35 testRunner.setBlockThirdPartyCookies(false);
36 } 36 }
37 37
38 var baseurl = "http://localhost:8000/cookies/resources/cookie-utility.php"; 38 var baseurl = "http://localhost:8000/cookies/resources/cookie-utility.php";
39 var url = queryCommand ? baseurl + "?queryfunction=" + queryCommand : baseur l; 39 var url = queryCommand ? baseurl + "?queryfunction=" + queryCommand : baseur l;
40 alert(url); 40 alert(url);
41 var req = new XMLHttpRequest(); 41 var req = new XMLHttpRequest();
42 req.open('GET', url, false); 42 req.open('GET', url, false);
43 req.send(); 43 req.send();
44 44
45 if (req.status == 200) 45 if (req.status == 200)
46 alert("XHR response - " + req.responseText); 46 alert("XHR response - " + req.responseText);
47 else 47 else
48 alert("xhr error"); 48 alert("xhr error");
49 49
50 if (window.testRunner) { 50 if (window.testRunner) {
51 testRunner.setAlwaysAcceptCookies(false); 51 testRunner.setBlockThirdPartyCookies(true);
52 } 52 }
53 53
54 parent.window.postMessage("done", "*"); 54 parent.window.postMessage("done", "*");
55 } 55 }
56 56
57 function resetCookiesAndNotifyDone() 57 function resetCookiesAndNotifyDone()
58 { 58 {
59 resetCookies(); 59 resetCookies();
60 if (window.testRunner) 60 if (window.testRunner)
61 testRunner.notifyDone(); 61 testRunner.notifyDone();
62 } 62 }
63 63
64 </script> 64 </script>
65 <body> 65 <body>
66 HELLO THERE 66 HELLO THERE
67 </body> 67 </body>
68 </html> 68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698