https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 100fc93516d33821fc0ba3087614329e24a9b360 authored by James Graham on 17 April 2014, 12:28:31 UTC
Improve cleanup for websockets unload tests
Tip revision: 100fc93
send-authentication-prompt-2-manual.htm
<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: WWW-Authenticate challenge when user,pass are not passed to open()</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::code[contains(@title,'http-authorization')]/.." />
  </head>
  <body>
    <p>Please follow these steps to complete the test:</p>
    <ol>
      <li>If you are prompted for user name and password, type in 'usr' and 'secret'</li>
    </ol>
    <div id="log"></div>
    <script>
      test(function() {
        var client = new XMLHttpRequest(),
          urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/')
        client.open("GET", location.protocol+'//'+urlstart + "resources/auth6/auth.py", false)
        client.send(null)
        assert_equals(client.responseText, 'usr' + "\n" + 'secret')
      }, document.title)
    </script>
  </body>
</html>
back to top