Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 function test() {
2 waitForExplicitFinish();
4 Task.spawn(function () {
5 let testPage = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
6 let tab1 = gBrowser.addTab();
7 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
8 yield FullZoomHelper.load(tab1, testPage);
10 let tab2 = gBrowser.addTab();
11 yield FullZoomHelper.load(tab2, testPage);
13 FullZoom.enlarge();
14 let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
16 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2);
17 let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
18 is(tab2Zoom, tab1Zoom, "Zoom should affect background tabs");
20 gPrefService.setBoolPref("browser.zoom.updateBackgroundTabs", false);
21 FullZoom.reset();
22 gBrowser.selectedTab = tab1;
23 tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser);
24 tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser);
25 isnot(tab1Zoom, tab2Zoom, "Zoom should not affect background tabs");
27 if (gPrefService.prefHasUserValue("browser.zoom.updateBackgroundTabs"))
28 gPrefService.clearUserPref("browser.zoom.updateBackgroundTabs");
29 yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1);
30 yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2);
31 }).then(finish, FullZoomHelper.failAndContinue(finish));
32 }