browser_bug419612.js
Go to the documentation of this file.
1 function test() {
3 
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");
14  FullZoom.enlarge();
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);
20  FullZoom.reset();
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);
28  finish();
29  }), true);
30  tab2.linkedBrowser.loadURI(testPage);
31  }), true);
32  content.location = testPage;
33 }
var FullZoom
function test()
var event
let testPage
waitForExplicitFinish()
var tab1
var tab2
return!aWindow arguments!aWindow arguments[0]