michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: Task.spawn(function () { michael@0: let testPage = "http://example.org/browser/browser/base/content/test/general/dummy_page.html"; michael@0: let tab1 = gBrowser.addTab(); michael@0: yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1); michael@0: yield FullZoomHelper.load(tab1, testPage); michael@0: michael@0: let tab2 = gBrowser.addTab(); michael@0: yield FullZoomHelper.load(tab2, testPage); michael@0: michael@0: FullZoom.enlarge(); michael@0: let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser); michael@0: michael@0: yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2); michael@0: let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser); michael@0: is(tab2Zoom, tab1Zoom, "Zoom should affect background tabs"); michael@0: michael@0: gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", false); michael@0: FullZoom.reset(); michael@0: gBrowser.selectedTab = tab1; michael@0: tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser); michael@0: tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser); michael@0: isnot(tab1Zoom, tab2Zoom, "Zoom should not affect background tabs"); michael@0: michael@0: if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs")) michael@0: gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs"); michael@0: yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1); michael@0: yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2); michael@0: }).then(finish, FullZoomHelper.failAndContinue(finish)); michael@0: }