3 <p>The
"Origin" header must be sent with a
"non-simple" cross-origin resource sharing request that uses the GET method.
</p>
4 <pre id=
"console"></pre>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
13 document
.getElementById('console').appendChild(document
.createTextNode(message
+ '\n'));
19 var xhr
= new XMLHttpRequest();
20 xhr
.open("GET", "http://localhost:8000/xmlhttprequest/resources/cross-origin-preflight-get.php", true);
21 // Make this a "non-simple" cross-origin request by adding a custom header.
22 xhr
.setRequestHeader("X-Proprietary-Header", "foo");
23 xhr
.onerror = function() { log("onerror") }
24 xhr
.onload = function() {
25 log(xhr
.responseText
);
26 if (window
.testRunner
)
27 testRunner
.notifyDone();