Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / access-control-preflight-request-header-lowercase.html
blob625f731fedf5cdd8184054e36faf57c54c5b8525
1 <html>
2 <body>
3 <p>Test for bug 75089: Access-Control-Request-Headers values should be lowercase.</p>
4 <script>
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-lowercase.php");
14 xhr.setRequestHeader("X-Custom-Header", "foobar");
15 xhr.onerror = function() {
16 document.body.appendChild(document.createTextNode("FAIL: onerror called"));
17 if (window.testRunner)
18 testRunner.notifyDone();
21 xhr.onreadystatechange=function() {
22 if (xhr.readyState==4) {
23 document.body.appendChild(document.createTextNode(xhr.responseText));
24 if (window.testRunner)
25 testRunner.notifyDone();
28 xhr.send();
30 sendRequest();
31 </script>
32 </body>
33 </html>