Allow XMLHttpRequest withCredentials to be set prior to a call to open()
[WebKit-https.git] / LayoutTests / fast / xmlhttprequest / xmlhttprequest-withcredentials-before-open.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <script src="../js/resources/js-test-pre.js"></script>
5     <script>
6         description('This tests that the XMLHttpRequest withCredentials attribute is modifiable prior to being in the OPENED state.');
7         var xhr;
8
9         xhr = new XMLHttpRequest();
10         evalAndLog("xhr.withCredentials = true;");
11         evalAndLog("xhr.open('GET', 'http://mydomain');");
12         shouldBeTrue('xhr.withCredentials');
13     </script>
14     <script src="../js/resources/js-test-post.js"></script>
15 </head>
16 <body>
17     <div id="description"></div>
18     <div id="console"></div>
19 </body>
20 </html>