browser/base/content/test/general/browser_bug575830.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:fc76b6c24624
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4 "use strict";
5
6 function test() {
7 let tab1, tab2;
8 const TEST_IMAGE = "http://example.org/browser/browser/base/content/test/general/moz.png";
9
10 waitForExplicitFinish();
11
12 Task.spawn(function () {
13 tab1 = gBrowser.addTab();
14 tab2 = gBrowser.addTab();
15 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
16 yield FullZoomHelper.load(tab1, TEST_IMAGE);
17
18 is(ZoomManager.zoom, 1, "initial zoom level for first should be 1");
19
20 FullZoom.enlarge();
21 let zoom = ZoomManager.zoom;
22 isnot(zoom, 1, "zoom level should have changed");
23
24 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2);
25 is(ZoomManager.zoom, 1, "initial zoom level for second tab should be 1");
26
27 yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
28 is(ZoomManager.zoom, zoom, "zoom level for first tab should not have changed");
29
30 yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1);
31 yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2);
32 }).then(finish, FullZoomHelper.failAndContinue(finish));
33 }

mercurial