blob: 023a40a63d04404041f945686bfdadccebd43293 [file] [log] [blame]
Hallvord Reiar M. Steene2795e32013-05-28 13:59:421<!doctype html>
2<html>
3 <head>
4 <title>XMLHttpRequest: WWW-Authenticate challenge when user,pass are not passed to open()</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
Ms2ger91fef142014-11-01 09:24:377 <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::code[contains(@title,'http-authorization')]/.." />
Hallvord Reiar M. Steene2795e32013-05-28 13:59:428 </head>
9 <body>
10 <p>Please follow these steps to complete the test:</p>
11 <ol>
12 <li>If you are prompted for user name and password, type in 'usr' and 'secret'</li>
13 </ol>
14 <div id="log"></div>
15 <script>
16 test(function() {
17 var client = new XMLHttpRequest(),
18 urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/')
James Graham234a6722013-09-17 17:54:3819 client.open("GET", location.protocol+'//'+urlstart + "resources/auth6/auth.py", false)
Hallvord Reiar M. Steene2795e32013-05-28 13:59:4220 client.send(null)
21 assert_equals(client.responseText, 'usr' + "\n" + 'secret')
22 }, document.title)
23 </script>
24 </body>
25</html>