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

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

Issue 2808753003: Carve out an exception for embedded credentials in XHR. (Closed)
Patch Set: Rebaseline. Created 3 years, 8 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 <script> 1 <script>
2 // Set authentication info 2 // Set authentication info
3 var port;
4 var w;
5 window.addEventListener("message", function(evt) { 3 window.addEventListener("message", function(evt) {
6 if (evt.ports[0]) { 4 var port = evt.ports[0];
7 port = evt.ports[0];
8 document.cookie = 'cookie=' + evt.data.cookie; 5 document.cookie = 'cookie=' + evt.data.cookie;
9 w = window.open(window.location.protocol + "//" + evt.data.username + ":" + evt.data.password + "@" + window.location.hostname + ":" + window.location.port + "/serviceworker/resources/fetch-access-control.php?Auth&WINDOW", evt.data.user name); 6 var xhr = new XMLHttpRequest();
10 } else { 7 xhr.addEventListener('load', function() {
11 w.close(); 8 port.postMessage({msg: 'LOGIN FINISHED'});
12 w = null; 9 }, false);
13 port.postMessage({msg: 'LOGIN FINISHED'}); 10 xhr.open('GET',
14 } 11 './fetch-access-control.php?Auth',
15 }, false); 12 true,
16 </script> 13 evt.data.username, evt.data.password);
14 xhr.send();
15 }, false);
16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698