tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug397234.html (982B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=397234
      5 -->
      6 <head>
      7  <title>Test for Bug 397234</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=397234">Mozilla Bug 397234</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 397234 */
     20 var req = new XMLHttpRequest();
     21 req.open("POST", window.location.href);
     22 // Capitalization of charet param is on purpose!
     23 req.setRequestHeader("Content-Type", "text/plain; charset='uTf-8'");
     24 req.send("Some text");
     25 
     26 is(SpecialPowers.wrap(req).channel
     27      .QueryInterface(SpecialPowers.Ci.nsIHttpChannel)
     28      .getRequestHeader("Content-Type"),
     29   "text/plain;charset=UTF-8",
     30   "Headers should match");
     31 </script>
     32 </pre>
     33 </body>
     34 </html>