tor-browser

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

browser_bug673087-2.js (754B)


      1 function test() {
      2  var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
      3  runCharsetTest(
      4    rootDir + "file_bug673087-2.html",
      5    afterOpen,
      6    afterChangeCharset
      7  );
      8 }
      9 
     10 function afterOpen() {
     11  is(
     12    content.document.documentElement.textContent.indexOf("\uFFFD"),
     13    0,
     14    "Doc should decode as replacement initially"
     15  );
     16 
     17  is(
     18    content.document.characterSet,
     19    "replacement",
     20    "Doc should report replacement initially"
     21  );
     22 }
     23 
     24 function afterChangeCharset() {
     25  is(
     26    content.document.documentElement.textContent.indexOf("\uFFFD"),
     27    0,
     28    "Doc should decode as replacement subsequently"
     29  );
     30 
     31  is(
     32    content.document.characterSet,
     33    "replacement",
     34    "Doc should report replacement subsequently"
     35  );
     36 }