mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 599482: need to call the "removed" handler when popup notifications are removed due to location changes, r=dtownsend, a=blocking
--HG-- extra : rebase_source : bc108537233f96bd353846829e3489c243257dd3
This commit is contained in:
parent
3d4488f4c7
commit
5e812d788f
@ -355,7 +355,7 @@ var tests = [
|
||||
},
|
||||
// The removal triggers another popuphidden event.
|
||||
function (popup) {}
|
||||
],
|
||||
]
|
||||
},
|
||||
// Test optional params
|
||||
{ // Test #10
|
||||
@ -414,7 +414,7 @@ var tests = [
|
||||
loadURI("http://example.org/", function() {
|
||||
loadURI("http://example.com/", function() {
|
||||
|
||||
// Next load will hide the notification
|
||||
// Next load will remove the notification
|
||||
self.complete = true;
|
||||
|
||||
loadURI("http://example.org/");
|
||||
@ -423,7 +423,7 @@ var tests = [
|
||||
},
|
||||
onHidden: function (popup) {
|
||||
ok(this.complete, "Should only have hidden the notification after 3 page loads");
|
||||
this.notification.remove();
|
||||
ok(this.notifyObj.removedCallbackTriggered, "removal callback triggered");
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
gBrowser.selectedTab = this.oldSelectedTab;
|
||||
}
|
||||
|
@ -290,6 +290,7 @@ PopupNotifications.prototype = {
|
||||
return true;
|
||||
}
|
||||
|
||||
this._fireCallback(notification, "removed");
|
||||
return false;
|
||||
}, this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user