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

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     4 const TEST_PAGE = "/browser/browser/base/content/test/general/dummy_page.html";
     5 var gTestTab, gBgTab, gTestZoom;
     7 function testBackgroundLoad() {
     8   Task.spawn(function () {
     9     is(ZoomManager.zoom, gTestZoom, "opening a background tab should not change foreground zoom");
    11     yield FullZoomHelper.removeTabAndWaitForLocationChange(gBgTab);
    13     FullZoom.reset();
    14     yield FullZoomHelper.removeTabAndWaitForLocationChange(gTestTab);
    15     finish();
    16   });
    17 }
    19 function testInitialZoom() {
    20   Task.spawn(function () {
    21     is(ZoomManager.zoom, 1, "initial zoom level should be 1");
    22     FullZoom.enlarge();
    24     gTestZoom = ZoomManager.zoom;
    25     isnot(gTestZoom, 1, "zoom level should have changed");
    27     gBgTab = gBrowser.addTab();
    28     yield FullZoomHelper.load(gBgTab, "http://mochi.test:8888" + TEST_PAGE);
    29   }).then(testBackgroundLoad, FullZoomHelper.failAndContinue(finish));
    30 }
    32 function test() {
    33   waitForExplicitFinish();
    35   Task.spawn(function () {
    36     gTestTab = gBrowser.addTab();
    37     yield FullZoomHelper.selectTabAndWaitForLocationChange(gTestTab);
    38     yield FullZoomHelper.load(gTestTab, "http://example.org" + TEST_PAGE);
    39   }).then(testInitialZoom, FullZoomHelper.failAndContinue(finish));
    40 }

mercurial