2009-04-08 23:45:07 -07:00
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
2013-03-16 15:12:31 -07:00
|
|
|
Task.spawn(function () {
|
|
|
|
let testPage = "http://example.org/browser/browser/base/content/test/dummy_page.html";
|
|
|
|
let tab1 = gBrowser.addTab();
|
|
|
|
yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
|
|
|
|
yield FullZoomHelper.load(tab1, testPage);
|
2009-09-16 09:30:20 -07:00
|
|
|
|
2009-04-08 23:45:07 -07:00
|
|
|
let tab2 = gBrowser.addTab();
|
2013-03-16 15:12:31 -07:00
|
|
|
yield FullZoomHelper.load(tab2, testPage);
|
2009-09-16 09:30:20 -07:00
|
|
|
|
2013-06-05 17:05:36 -07:00
|
|
|
FullZoom.enlarge();
|
2013-03-16 15:12:31 -07:00
|
|
|
let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
|
2009-09-16 09:30:20 -07:00
|
|
|
|
2013-03-16 15:12:31 -07:00
|
|
|
yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2);
|
|
|
|
let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
|
|
|
|
is(tab2Zoom, tab1Zoom, "Zoom should affect background tabs");
|
2010-03-25 03:52:21 -07:00
|
|
|
|
2013-03-16 15:12:31 -07:00
|
|
|
gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", false);
|
2013-06-05 17:05:36 -07:00
|
|
|
FullZoom.reset();
|
2013-03-16 15:12:31 -07:00
|
|
|
gBrowser.selectedTab = tab1;
|
|
|
|
tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
|
|
|
|
tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
|
|
|
|
isnot(tab1Zoom, tab2Zoom, "Zoom should not affect background tabs");
|
2009-09-16 09:30:20 -07:00
|
|
|
|
2013-03-16 15:12:31 -07:00
|
|
|
if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs"))
|
|
|
|
gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs");
|
|
|
|
gBrowser.removeTab(tab1);
|
|
|
|
gBrowser.removeTab(tab2);
|
|
|
|
}).then(finish, FullZoomHelper.failAndContinue(finish));
|
2010-03-25 03:52:21 -07:00
|
|
|
}
|