Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | /* |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | */ |
michael@0 | 5 | |
michael@0 | 6 | function test() { |
michael@0 | 7 | waitForExplicitFinish(); |
michael@0 | 8 | let newWin = OpenBrowserWindow(); |
michael@0 | 9 | whenDelayedStartupFinished(newWin, function () { |
michael@0 | 10 | // Remove the URL bar |
michael@0 | 11 | newWin.gURLBar.parentNode.removeChild(newWin.gURLBar); |
michael@0 | 12 | |
michael@0 | 13 | waitForFocus(function () { |
michael@0 | 14 | let PN = newWin.PopupNotifications; |
michael@0 | 15 | PN.transitionsEnabled = false; |
michael@0 | 16 | try { |
michael@0 | 17 | let notification = PN.show(newWin.gBrowser.selectedBrowser, "some-notification", "Some message"); |
michael@0 | 18 | ok(notification, "showed the notification"); |
michael@0 | 19 | ok(PN.isPanelOpen, "panel is open"); |
michael@0 | 20 | is(PN.panel.anchorNode, newWin.gBrowser.selectedTab, "notification is correctly anchored to the tab"); |
michael@0 | 21 | PN.panel.hidePopup(); |
michael@0 | 22 | } catch (ex) { |
michael@0 | 23 | ok(false, "threw exception: " + ex); |
michael@0 | 24 | } |
michael@0 | 25 | PN.transitionsEnabled = true; |
michael@0 | 26 | newWin.close(); |
michael@0 | 27 | finish(); |
michael@0 | 28 | }, newWin); |
michael@0 | 29 | }); |
michael@0 | 30 | } |