browser/base/content/test/general/browser_customize_popupNotification.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 /*
     2 Any copyright is dedicated to the Public Domain.
     3 http://creativecommons.org/publicdomain/zero/1.0/
     4 */
     6 function test() {
     7   waitForExplicitFinish();
     8   let newWin = OpenBrowserWindow();
     9   whenDelayedStartupFinished(newWin, function () {
    10     // Remove the URL bar
    11     newWin.gURLBar.parentNode.removeChild(newWin.gURLBar);
    13     waitForFocus(function () {
    14       let PN = newWin.PopupNotifications;
    15       PN.transitionsEnabled = false;
    16       try {
    17         let notification = PN.show(newWin.gBrowser.selectedBrowser, "some-notification", "Some message");
    18         ok(notification, "showed the notification");
    19         ok(PN.isPanelOpen, "panel is open");
    20         is(PN.panel.anchorNode, newWin.gBrowser.selectedTab, "notification is correctly anchored to the tab");
    21         PN.panel.hidePopup();
    22       } catch (ex) {
    23         ok(false, "threw exception: " + ex);
    24       }
    25       PN.transitionsEnabled = true;
    26       newWin.close();
    27       finish();
    28     }, newWin);
    29   });
    30 }

mercurial