3 <p>Test for bug
452391: Header names in Access-Control-Request-Headers must be sorted.
</p>
5 if (window
.testRunner
) {
6 testRunner
.dumpAsText();
7 testRunner
.waitUntilDone();
10 function sendRequest()
12 var xhr
= new XMLHttpRequest
;
13 xhr
.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-preflight-request-header-sorted.php");
14 xhr
.setRequestHeader("X-Custom-Test", "foobar");
15 xhr
.setRequestHeader("X-Custom-ua", "foobar");
16 xhr
.setRequestHeader("X-Custom-V", "foobar");
17 xhr
.setRequestHeader("X-Custom-s", "foobar");
18 xhr
.setRequestHeader("X-Custom-U", "foobar");
19 xhr
.onerror = function() {
20 document
.body
.appendChild(document
.createTextNode("FAIL: onerror called"));
21 if (window
.testRunner
)
22 testRunner
.notifyDone();
25 xhr
.onreadystatechange=function() {
26 if (xhr
.readyState
==4) {
27 document
.body
.appendChild(document
.createTextNode(xhr
.responseText
));
28 if (window
.testRunner
)
29 testRunner
.notifyDone();