| Index: webkit/data/layout_tests/LayoutTests/http/tests/xmlhttprequest/authorization-header.html
|
| ===================================================================
|
| --- webkit/data/layout_tests/LayoutTests/http/tests/xmlhttprequest/authorization-header.html (revision 0)
|
| +++ webkit/data/layout_tests/LayoutTests/http/tests/xmlhttprequest/authorization-header.html (revision 0)
|
| @@ -0,0 +1,15 @@
|
| +<p>Test that Authorization header can be set via setRequestHeader.</p>
|
| +<script>
|
| +if (window.layoutTestController)
|
| + layoutTestController.dumpAsText();
|
| +
|
| +try {
|
| + var req = new XMLHttpRequest;
|
| + req.open("GET", "resources/basic-auth/basic-auth.php?uid=Authorization-Header", false);
|
| + req.setRequestHeader("Authorization", "Basic QXV0aG9yaXphdGlvbi1IZWFkZXI6QXV0aG9yaXphdGlvbi1IZWFkZXI=");
|
| + req.send(null);
|
| + document.write(req.responseText.match(/Authorization\-Header/) ? "PASS" : ("FAIL. Unexpected response: " + req.responseText));
|
| +} catch (ex) {
|
| + document.write("FAIL. Exception: " + ex);
|
| +}
|
| +</script>
|
|
|