tor-browser

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

test_bug692434.html (1180B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=692434
      5 -->
      6 <head>
      7  <title>Test for Bug 692434</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 onload=runTest();>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=692434">Mozilla Bug 692434</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 
     20 /** Test for Bug 692434 */
     21 SimpleTest.waitForExplicitFinish();
     22 
     23 var xhr = new XMLHttpRequest();
     24 
     25 function runTest() {
     26  xhr.onreadystatechange = function() {
     27    if (this.readyState == 4) {
     28      ok(this.responseXML, "Should have gotten responseXML");
     29      is(this.responseXML.characterSet, "windows-1251", "Wrong character encoding");
     30      is(this.responseXML.documentElement.firstChild.data, "\u042E", "Decoded using the wrong encoding.");
     31      is(this.responseText.indexOf("\u042E"), 51, "Bad responseText");
     32      SimpleTest.finish();
     33    }
     34  }
     35  xhr.open("GET", "file_bug692434.xml");
     36  xhr.send();
     37 }
     38 
     39 </script>
     40 </pre>
     41 </body>
     42 </html>