tor-browser

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

encoding.window.js (689B)


      1 async_test(t => {
      2  const frame = document.body.appendChild(document.createElement("iframe"));
      3  frame.src = "resources/encoding-frame.html";
      4  frame.onload = t.step_func_done(t => {
      5    // Using toLowerCase() to avoid an Edge bug
      6    assert_equals(frame.contentDocument.characterSet.toLowerCase(), "shift_jis", "precondition");
      7    assert_equals(frame.contentDocument.open(), frame.contentDocument);
      8    assert_equals(frame.contentDocument.characterSet.toLowerCase(), "shift_jis", "actual test");
      9    frame.contentDocument.close();
     10    assert_equals(frame.contentDocument.characterSet.toLowerCase(), "shift_jis", "might as well");
     11  });
     12 }, "doucment.open() and the document's encoding");