michael@0: /* michael@0: Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: let newWin = OpenBrowserWindow(); michael@0: whenDelayedStartupFinished(newWin, function () { michael@0: // Remove the URL bar michael@0: newWin.gURLBar.parentNode.removeChild(newWin.gURLBar); michael@0: michael@0: waitForFocus(function () { michael@0: let PN = newWin.PopupNotifications; michael@0: PN.transitionsEnabled = false; michael@0: try { michael@0: let notification = PN.show(newWin.gBrowser.selectedBrowser, "some-notification", "Some message"); michael@0: ok(notification, "showed the notification"); michael@0: ok(PN.isPanelOpen, "panel is open"); michael@0: is(PN.panel.anchorNode, newWin.gBrowser.selectedTab, "notification is correctly anchored to the tab"); michael@0: PN.panel.hidePopup(); michael@0: } catch (ex) { michael@0: ok(false, "threw exception: " + ex); michael@0: } michael@0: PN.transitionsEnabled = true; michael@0: newWin.close(); michael@0: finish(); michael@0: }, newWin); michael@0: }); michael@0: }