4 let
testPage =
"http://example.org/browser/browser/base/content/test/dummy_page.html";
5 let prefService = Components.classes[
"@mozilla.org/preferences-service;1"]
6 .getService(Components.interfaces.nsIPrefBranch);
7 let
tab1 = gBrowser.selectedTab = gBrowser.addTab();
8 tab1.linkedBrowser.addEventListener(
"load", (
function(
event) {
9 event.currentTarget.removeEventListener(
"load",
arguments.callee,
true);
10 let
tab2 = gBrowser.addTab();
11 tab2.linkedBrowser.addEventListener(
"load", (
function(
event) {
12 event.currentTarget.removeEventListener(
"load",
arguments.callee,
true);
13 let oldPref = prefService.getBoolPref(
"browser.zoom.updateBackgroundTabs");
15 let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
16 gBrowser.selectedTab =
tab2;
17 let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
18 is(tab2Zoom, tab1Zoom,
"Zoom should affect background tabs");
19 prefService.setBoolPref(
"browser.zoom.updateBackgroundTabs",
false);
21 gBrowser.selectedTab =
tab1;
22 tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
23 tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
24 isnot(tab1Zoom, tab2Zoom,
"Zoom should not affect background tabs");
25 prefService.setBoolPref(
"browser.zoom.updateBackgroundTabs", oldPref);
26 gBrowser.removeTab(tab1);
27 gBrowser.removeTab(tab2);
30 tab2.linkedBrowser.loadURI(testPage);
return!aWindow arguments!aWindow arguments[0]