blob: 1ab9157ab4d1b80bfc2e8abc7061060986bff1cb [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.setHandlesAuthenticationChallenges(true);
testRunner.setAuthenticationUsername("wrongusername");
testRunner.setAuthenticationPassword("wrongpassword");
testRunner.waitUntilDone();
}
function firstFrameLoaded() {
if (window.testRunner) {
testRunner.setAuthenticationUsername("correctusername");
testRunner.setAuthenticationPassword("correctpassword");
}
var frame = document.createElement("iframe");
frame.setAttribute("src", "http://127.0.0.1:8000/loading/resources/test2/basic-auth-testing.php?username=correctusername&password=correctpassword");
frame.setAttribute("onload", "secondFrameLoaded()");
document.body.appendChild(frame);
}
function secondFrameLoaded() {
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body>
This test makes sure that once WebCore preemptively sends out Basic credentials it thinks apply to a new resource, and that resource response with a 401 challenge, that it doesn't try to send the same wrong credentials a second time.<br>
<iframe src="resources/test2/protected-resource.php" onload="firstFrameLoaded();"></iframe>
</body>
</html>