browser/base/content/test/general/browser_bug419612.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 function test() {
     2   waitForExplicitFinish();
     4   Task.spawn(function () {
     5     let testPage = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
     6     let tab1 = gBrowser.addTab();
     7     yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
     8     yield FullZoomHelper.load(tab1, testPage);
    10     let tab2 = gBrowser.addTab();
    11     yield FullZoomHelper.load(tab2, testPage);
    13     FullZoom.enlarge();
    14     let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
    16     yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2);
    17     let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
    18     is(tab2Zoom, tab1Zoom, "Zoom should affect background tabs");
    20     gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", false);
    21     FullZoom.reset();
    22     gBrowser.selectedTab = tab1;
    23     tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
    24     tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
    25     isnot(tab1Zoom, tab2Zoom, "Zoom should not affect background tabs");
    27     if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs"))
    28       gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs");
    29     yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1);
    30     yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2);
    31   }).then(finish, FullZoomHelper.failAndContinue(finish));
    32 }

mercurial