2 <p><a href=
"rdar://problem/7062824">rdar://problem/
7062824</a> A wrong password entered for site or proxy auth remains in WebCore credential storage, and is sent with subsequent requests.
</p>
3 <p>This test counts the number of failed requests server side.
</p>
4 <div id = result
>Testing... Please cancel all authentication dialogs.
</div></br>
6 <button onclick=
"sendWithCredentials(false)">With credentials
</button>
7 <button onclick=
"sendWithoutCredentials(false)">Without credentials
</button>
9 <button onclick=
"sendWithCredentials(true)">With credentials
</button>
10 <button onclick=
"sendWithoutCredentials(true)">Without credentials
</button>
12 <button onclick=
"status()">Status
</button>
14 if (window
.testRunner
) {
15 testRunner
.dumpAsText();
16 testRunner
.waitUntilDone()
19 function sendWithCredentials(next
)
21 var xhr
= new XMLHttpRequest
;
22 xhr
.open("GET", "resources/remember-bad-password/count-failures.php", next
? true : false, "foo", "bar");
30 function sendWithoutCredentials(next
)
32 var xhr
= new XMLHttpRequest
;
33 xhr
.open("GET", "resources/remember-bad-password/count-failures.php", next
? true : false);
44 var xhr
= new XMLHttpRequest
;
45 xhr
.open("GET", "resources/remember-bad-password/count-failures.php?command=status", false);
47 return xhr
.responseText
;
52 var xhr
= new XMLHttpRequest
;
53 xhr
.open("GET", "resources/remember-bad-password/count-failures.php?command=reset", false);
58 sendWithCredentials();
59 sendWithoutCredentials();
60 sendWithCredentials(function() {
61 sendWithoutCredentials(function() {
63 document
.getElementById("result").innerHTML
= (s
== 2 ? "PASS" : ("FAIL: " + s
));
64 if (window
.testRunner
)
65 testRunner
.notifyDone();