Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 }