зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849764 - Replace removeObserver() calls with three params with two in toolkit dir. r=mak
This commit is contained in:
Родитель
48b62b800b
Коммит
b59597d162
|
@ -88,7 +88,7 @@ function test() {
|
|||
|
||||
Services.obs.addObserver(function (aSubject, aTopic, aData) {
|
||||
if (aTopic == "passwordmgr-password-toggle-complete") {
|
||||
Services.obs.removeObserver(arguments.callee, aTopic, false);
|
||||
Services.obs.removeObserver(arguments.callee, aTopic);
|
||||
func();
|
||||
}
|
||||
}, "passwordmgr-password-toggle-complete", false);
|
||||
|
|
|
@ -99,7 +99,7 @@ function test() {
|
|||
|
||||
Services.obs.addObserver(function (aSubject, aTopic, aData) {
|
||||
if (aTopic == "passwordmgr-password-toggle-complete") {
|
||||
Services.obs.removeObserver(arguments.callee, aTopic, false);
|
||||
Services.obs.removeObserver(arguments.callee, aTopic);
|
||||
func();
|
||||
}
|
||||
}, "passwordmgr-password-toggle-complete", false);
|
||||
|
|
|
@ -31,7 +31,7 @@ this.MozSocialAPI = {
|
|||
}
|
||||
|
||||
} else {
|
||||
Services.obs.removeObserver(injectController, "document-element-inserted", false);
|
||||
Services.obs.removeObserver(injectController, "document-element-inserted");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ let tests = {
|
|||
profileURL: "http://en.wikipedia.org/wiki/Kuma_Lisa"
|
||||
}
|
||||
function ob(aSubject, aTopic, aData) {
|
||||
Services.obs.removeObserver(ob, "social:profile-changed", false);
|
||||
Services.obs.removeObserver(ob, "social:profile-changed");
|
||||
is(aData, provider.origin, "update of profile from our provider");
|
||||
let profile = provider.profile;
|
||||
is(profile.portrait, expect.portrait, "portrait is set");
|
||||
|
@ -56,7 +56,7 @@ let tests = {
|
|||
name: "test-ambient"
|
||||
}
|
||||
function ob(aSubject, aTopic, aData) {
|
||||
Services.obs.removeObserver(ob, "social:ambient-notification-changed", false);
|
||||
Services.obs.removeObserver(ob, "social:ambient-notification-changed");
|
||||
is(aData, provider.origin, "update is from our provider");
|
||||
let notif = provider.ambientNotificationIcons[expect.name];
|
||||
is(notif.name, expect.name, "ambientNotification reflected");
|
||||
|
@ -74,7 +74,7 @@ let tests = {
|
|||
userName: ""
|
||||
};
|
||||
function ob(aSubject, aTopic, aData) {
|
||||
Services.obs.removeObserver(ob, "social:profile-changed", false);
|
||||
Services.obs.removeObserver(ob, "social:profile-changed");
|
||||
is(aData, provider.origin, "update of profile from our provider");
|
||||
is(Object.keys(provider.profile).length, 0, "profile was cleared by empty username");
|
||||
is(Object.keys(provider.ambientNotificationIcons).length, 0, "icons were cleared by empty username");
|
||||
|
|
Загрузка…
Ссылка в новой задаче