browser/base/content/test/general/browser_bug419612.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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