1<html>
2<body>
3<p>Test case for issue #50773 - the "Origin" header should be properly sent with a non-simple cross-origin resource sharing request that uses the GET method.</p>
4<pre id="console"></pre>
5<script>
6if (window.layoutTestController) {
7 layoutTestController.dumpAsText();
8}
9
10function log(message)
11{
12 document.getElementById('console').appendChild(document.createTextNode(message + '\n'));
13}
14
15
16function test()
17{
18 var xhr = new XMLHttpRequest();
19 xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/cross-origin-preflight-get.php", true);
20 xhr.setRequestHeader("X-Proprietary-Header", "foo"); // make this a non-simple CORS request
21 xhr.onerror = function() { log("onerror") }
22 xhr.onload = function() {
23 log(xhr.responseText);
24 }
25 xhr.send(null);
26}
27
28test();
29</script>
30</body>
31</html>