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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial