Bug 752216. (Cv2) browser_popupNotification.js: Port |Bug 617553 - Doorhanger for add-on installation failures inside the AOM has no parent with chrome hidden|, Port patch Gv1-FF. r=Neil, a=Callek
authorSerge Gautherie <sgautherie.bz@free.fr>
Wed, 09 May 2012 17:13:00 -0400
changeset 11326 cb351f3a6c597adb82e7c62d9f350dee86627276
parent 11325 9c608274d11632c3979e3e6e4bdbad07460b0515
child 11327 71e5441743ebe2446c3f47c83dc76a2eb4236632
push idunknown
push userunknown
push dateunknown
reviewersNeil, Callek
bugs752216, 617553
Bug 752216. (Cv2) browser_popupNotification.js: Port |Bug 617553 - Doorhanger for add-on installation failures inside the AOM has no parent with chrome hidden|, Port patch Gv1-FF. r=Neil, a=Callek
suite/browser/test/browser/browser_popupNotification.js
--- a/suite/browser/test/browser/browser_popupNotification.js
+++ b/suite/browser/test/browser/browser_popupNotification.js
@@ -593,16 +593,35 @@ var tests = [
       EventUtils.synthesizeMouseAtCenter(notification.closebutton, {});
     },
     onHidden: function (popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
+  // Test notification when chrome is hidden
+  { // Test #19
+    run: function () {
+      window.locationbar.visible = false;
+      this.notifyObj = new basicNotification();
+      this.notification = showNotification(this.notifyObj);
+      window.locationbar.visible = true;
+    },
+    onShown: function (popup) {
+      checkPopup(popup, this.notifyObj);
+      is(popup.anchorNode.className, "tabbrowser-tab", "notification anchored to tab");
+      dismissNotification(popup);
+    },
+    onHidden: function (popup) {
+      ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
+      this.notification.remove();
+      ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
+    }
+  },
 ];
 
 function showNotification(notifyObj) {
   return PopupNotifications.show(notifyObj.browser,
                                  notifyObj.id,
                                  notifyObj.message,
                                  notifyObj.anchorID,
                                  notifyObj.mainAction,