| <html> |
| <body> |
| <p>Test for bug 75089: Access-Control-Request-Headers values should be lowercase.</p> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function sendRequest() |
| { |
| var xhr = new XMLHttpRequest; |
| xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/access-control-preflight-request-header-lowercase.py"); |
| xhr.setRequestHeader("X-Custom-Header", "foobar"); |
| xhr.onerror = function() { |
| document.body.appendChild(document.createTextNode("FAIL: onerror called")); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| xhr.onreadystatechange=function() { |
| if (xhr.readyState==4) { |
| document.body.appendChild(document.createTextNode(xhr.responseText)); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| } |
| xhr.send(); |
| } |
| sendRequest(); |
| </script> |
| </body> |
| </html> |