diff -r 000000000000 -r 6474c204b198 browser/base/content/test/general/browser_customize_popupNotification.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/base/content/test/general/browser_customize_popupNotification.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,30 @@ +/* +Any copyright is dedicated to the Public Domain. +http://creativecommons.org/publicdomain/zero/1.0/ +*/ + +function test() { + waitForExplicitFinish(); + let newWin = OpenBrowserWindow(); + whenDelayedStartupFinished(newWin, function () { + // Remove the URL bar + newWin.gURLBar.parentNode.removeChild(newWin.gURLBar); + + waitForFocus(function () { + let PN = newWin.PopupNotifications; + PN.transitionsEnabled = false; + try { + let notification = PN.show(newWin.gBrowser.selectedBrowser, "some-notification", "Some message"); + ok(notification, "showed the notification"); + ok(PN.isPanelOpen, "panel is open"); + is(PN.panel.anchorNode, newWin.gBrowser.selectedTab, "notification is correctly anchored to the tab"); + PN.panel.hidePopup(); + } catch (ex) { + ok(false, "threw exception: " + ex); + } + PN.transitionsEnabled = true; + newWin.close(); + finish(); + }, newWin); + }); +}