|
1 function test() { |
|
2 waitForExplicitFinish(); |
|
3 |
|
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); |
|
9 |
|
10 let tab2 = gBrowser.addTab(); |
|
11 yield FullZoomHelper.load(tab2, testPage); |
|
12 |
|
13 FullZoom.enlarge(); |
|
14 let tab1Zoom = ZoomManager.getZoomForBrowser(tab1.linkedBrowser); |
|
15 |
|
16 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2); |
|
17 let tab2Zoom = ZoomManager.getZoomForBrowser(tab2.linkedBrowser); |
|
18 is(tab2Zoom, tab1Zoom, "Zoom should affect background tabs"); |
|
19 |
|
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"); |
|
26 |
|
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 } |