docshell/test/browser/browser_bug852909.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
     3 function test() {
     4   waitForExplicitFinish();
     6   gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug852909.png");
     7   gBrowser.selectedBrowser.addEventListener("load", image, true);
     8 }
    10 function image(event) {
    11   if (event.target != gBrowser.contentDocument) {
    12     return;
    13   }
    14   gBrowser.selectedBrowser.removeEventListener("load", image, true);
    16   ok(!gBrowser.docShell.mayEnableCharacterEncodingMenu, "Docshell should say the menu should be disabled for images.");
    18   gBrowser.removeCurrentTab();
    19   gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug852909.pdf");
    20   gBrowser.selectedBrowser.addEventListener("load", pdf, true);
    21 }
    23 function pdf(event) {
    24   if (event.target != gBrowser.contentDocument) {
    25     return;
    26   }
    27   gBrowser.selectedBrowser.removeEventListener("load", pdf, true);
    29   ok(!gBrowser.docShell.mayEnableCharacterEncodingMenu, "Docshell should say the menu should be disabled for PDF.js.");
    31   gBrowser.removeCurrentTab();
    32   finish();
    33 }

mercurial