1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/general/browser_bug575830.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 +"use strict"; 1.8 + 1.9 +function test() { 1.10 + let tab1, tab2; 1.11 + const TEST_IMAGE = "http://example.org/browser/browser/base/content/test/general/moz.png"; 1.12 + 1.13 + waitForExplicitFinish(); 1.14 + 1.15 + Task.spawn(function () { 1.16 + tab1 = gBrowser.addTab(); 1.17 + tab2 = gBrowser.addTab(); 1.18 + yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1); 1.19 + yield FullZoomHelper.load(tab1, TEST_IMAGE); 1.20 + 1.21 + is(ZoomManager.zoom, 1, "initial zoom level for first should be 1"); 1.22 + 1.23 + FullZoom.enlarge(); 1.24 + let zoom = ZoomManager.zoom; 1.25 + isnot(zoom, 1, "zoom level should have changed"); 1.26 + 1.27 + yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2); 1.28 + is(ZoomManager.zoom, 1, "initial zoom level for second tab should be 1"); 1.29 + 1.30 + yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1); 1.31 + is(ZoomManager.zoom, zoom, "zoom level for first tab should not have changed"); 1.32 + 1.33 + yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1); 1.34 + yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2); 1.35 + }).then(finish, FullZoomHelper.failAndContinue(finish)); 1.36 +}