1 <p>Test that custom headers are not sent with OPTIONS preflight request.
</p>
3 if (window
.testRunner
) {
4 testRunner
.dumpAsText();
5 testRunner
.waitUntilDone();
10 var req
= new XMLHttpRequest
;
11 req
.open("GET", "/resources/reset-temp-file.php?filename=access-control-preflight-headers-status", false);
15 function sendRequest()
17 var req
= new XMLHttpRequest
;
18 req
.open("GET", "http://localhost:8000/xmlhttprequest/resources/no-custom-header.php");
19 req
.setRequestHeader("X-Custom-Header", "foobar");
20 req
.onerror = function() {
21 document
.body
.appendChild(document
.createTextNode("FAIL: onerror called"));
22 if (window
.testRunner
)
23 testRunner
.notifyDone();
25 req
.onload = function() {
26 document
.body
.appendChild(document
.createTextNode(req
.responseText
));
27 if (window
.testRunner
)
28 testRunner
.notifyDone();