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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/fetch-access-control-login.html

Issue 416353002: [ServiceWorker] Add test for cookies of fetch() in ServiceWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 // Set authentication info 2 // Set authentication info
3 window.addEventListener("message", function(evt) { 3 window.addEventListener("message", function(evt) {
4 var port = evt.ports[0]; 4 var port = evt.ports[0];
5 document.cookie = 'cookie=' + evt.data.username;
5 var xhr = new XMLHttpRequest(); 6 var xhr = new XMLHttpRequest();
6 xhr.addEventListener('load', function() { 7 xhr.addEventListener('load', function() {
7 port.postMessage({msg: 'LOGIN FINISHED'}); 8 port.postMessage({msg: 'LOGIN FINISHED'});
8 }, false); 9 }, false);
9 xhr.open('GET', 10 xhr.open('GET',
10 './fetch-access-control.php?Auth', 11 './fetch-access-control.php?Auth',
11 true, 12 true,
12 evt.data.username, evt.data.password); 13 evt.data.username, evt.data.password);
13 xhr.send(); 14 xhr.send();
14 }, false); 15 }, false);
15 </script> 16 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698