6 waitForExplicitFinish();
8 let oldOLC = FullZoom.onLocationChange;
9 FullZoom.onLocationChange = function(aURI, aIsTabSwitch, aBrowser) {
10 // Ignore calls that are not about tab switching on this test
12 oldOLC.call(FullZoom, aURI, aIsTabSwitch, aBrowser);
15 gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", true);
16 gPrefService.setBoolPref("browser.zoom.siteSpecific", true);
18 let oldAPTS = FullZoom._applyPrefToSetting;
19 let uri = "http://example.org/browser/browser/base/content/test/dummy_page.html";
21 let tab = gBrowser.addTab();
22 tab.linkedBrowser.addEventListener("load", function(event) {
23 tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
25 // -------------------------------------------------------------------
26 // Test - Trigger a tab switch that should update the zoom level
27 FullZoom._applyPrefToSetting = function() {
28 ok(true, "applyPrefToSetting was called");
31 gBrowser.selectedTab = tab;
34 tab.linkedBrowser.loadURI(uri);
39 FullZoom._applyPrefToSetting = oldAPTS;
40 FullZoom.onLocationChange = oldOLC;
41 gBrowser.removeTab(tab);
47 if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs"))
48 gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs");
50 if (gPrefService.prefHasUserValue("browser.zoom.siteSpecific"))
51 gPrefService.clearUserPref("browser.zoom.siteSpecific");