|
1 /* |
|
2 Any copyright is dedicated to the Public Domain. |
|
3 http://creativecommons.org/publicdomain/zero/1.0/ |
|
4 */ |
|
5 |
|
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); |
|
12 |
|
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 } |