1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
4 <title>setRequestHeader twice for the same header
</title>
7 <p>FAIL: Script did not run.
</p>
8 <script type=
"text/javascript">
10 testRunner
.dumpAsText();
12 var p
= document
.getElementsByTagName('p')[0];
13 p
.firstChild
.data
= 'FAIL: Test script did not finish.';
14 window
.onerror = function (error
, file
, line
) { p
.firstChild
.data
= 'ERROR: ' + error
+ ' (line ' + line
+ ')'; }
15 if (!window
.XMLHttpRequest
)
16 window
.XMLHttpRequest = function () { return new ActiveXObject("Microsoft.XMLHTTP"); }
17 var r
= new XMLHttpRequest();
18 r
.open('GET', '005-test.cgi', false);
19 r
.setRequestHeader('X-Test-Header', 'ONE');
20 r
.setRequestHeader('X-Test-Header', 'TWO');
22 if (r
.responseText
== 'RESULT:[ONE, TWO]') {
23 p
.firstChild
.data
= 'PASS';
25 p
.firstChild
.data
= 'FAIL (' + r
.responseText
+ ')';