tor-browser

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

browser_bug852909.js (858B)


      1 var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
      2 
      3 function test() {
      4  waitForExplicitFinish();
      5 
      6  gBrowser.selectedTab = BrowserTestUtils.addTab(
      7    gBrowser,
      8    rootDir + "file_bug852909.png"
      9  );
     10  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(image);
     11 }
     12 
     13 function image() {
     14  ok(
     15    !gBrowser.selectedTab.mayEnableCharacterEncodingMenu,
     16    "Docshell should say the menu should be disabled for images."
     17  );
     18 
     19  gBrowser.removeCurrentTab();
     20  gBrowser.selectedTab = BrowserTestUtils.addTab(
     21    gBrowser,
     22    rootDir + "file_bug852909.pdf"
     23  );
     24  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(pdf);
     25 }
     26 
     27 function pdf() {
     28  ok(
     29    !gBrowser.selectedTab.mayEnableCharacterEncodingMenu,
     30    "Docshell should say the menu should be disabled for PDF.js."
     31  );
     32 
     33  gBrowser.removeCurrentTab();
     34  finish();
     35 }