4 <p>Test the behavior of a sync XMLHttpRequest that encounters an infinite redirection loop.
</p>
8 testRunner
.dumpAsText();
11 if (window
.XMLHttpRequest
) {
12 req
= new XMLHttpRequest();
15 req
= new ActiveXObject("Msxml2.XMLHTTP");
17 req
= new ActiveXObject("Microsoft.XMLHTTP");
21 req
.open('GET', 'resources/infinite-loop.php', false);
22 req
.onreadystatechange = function()
24 document
.write('onreadystatechange is invoked unexpectedly<br>');
26 req
.onerror = function()
28 document
.write('onerror is invoked unexpectedly<br>');
32 document
.write("Status: " + req
.status
);
35 document
.write("Exception " + ex
.name
+ "; code=" + ex
.code
+ "; number=" + ex
.number
+ " (" + (ex
.number
& 0xFFFF) + "); message='" + ex
.message
+ "'");