Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / resources / fetch-access-control-login.html
blob4152c669da466f96f961a88ea5a5b95930ca1b34
1 <script>
2 // Set authentication info
3 window.addEventListener("message", function(evt) {
4 var port = evt.ports[0];
5 document.cookie = 'cookie=' + evt.data.cookie;
6 var xhr = new XMLHttpRequest();
7 xhr.addEventListener('load', function() {
8 port.postMessage({msg: 'LOGIN FINISHED'});
9 }, false);
10 xhr.open('GET',
11 './fetch-access-control.php?Auth',
12 true,
13 evt.data.username, evt.data.password);
14 xhr.send();
15 }, false);
16 </script>