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.

     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";
     6 function test() {
     7   let tab1, tab2;
     8   const TEST_IMAGE = "http://example.org/browser/browser/base/content/test/general/moz.png";
    10   waitForExplicitFinish();
    12   Task.spawn(function () {
    13     tab1 = gBrowser.addTab();
    14     tab2 = gBrowser.addTab();
    15     yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
    16     yield FullZoomHelper.load(tab1, TEST_IMAGE);
    18     is(ZoomManager.zoom, 1, "initial zoom level for first should be 1");
    20     FullZoom.enlarge();
    21     let zoom = ZoomManager.zoom;
    22     isnot(zoom, 1, "zoom level should have changed");
    24     yield FullZoomHelper.selectTabAndWaitForLocationChange(tab2);
    25     is(ZoomManager.zoom, 1, "initial zoom level for second tab should be 1");
    27     yield FullZoomHelper.selectTabAndWaitForLocationChange(tab1);
    28     is(ZoomManager.zoom, zoom, "zoom level for first tab should not have changed");
    30     yield FullZoomHelper.removeTabAndWaitForLocationChange(tab1);
    31     yield FullZoomHelper.removeTabAndWaitForLocationChange(tab2);
    32   }).then(finish, FullZoomHelper.failAndContinue(finish));
    33 }

mercurial