test_bug393968.html (977B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=393968 5 --> 6 <head> 7 <title>Test for Bug 393968</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=393968">Mozilla Bug 393968</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 /** Test for Bug 393968 */ 20 var req = new XMLHttpRequest(); 21 req.open("POST", window.location.href); 22 req.setRequestHeader("Content-Type", "text/plain; charset=us-ascii; boundary=01234567890"); 23 req.send("Some text"); 24 25 is(SpecialPowers.wrap(req).channel 26 .QueryInterface(SpecialPowers.Ci.nsIHttpChannel) 27 .getRequestHeader("Content-Type"), 28 "text/plain;charset=UTF-8;boundary=01234567890", 29 "Headers should match"); 30 </script> 31 </pre> 32 </body> 33 </html>