Bug 1037128 - Regression: Contact API usage is being prompt on webpages r=fabrice

This commit is contained in:
Mark Finkle 2014-07-14 10:31:16 -07:00
Родитель 8b1b2270f8
Коммит dbe64e615e
2 изменённых файлов: 14 добавлений и 5 удалений

Просмотреть файл

@ -248,10 +248,16 @@ ContactManager.prototype = {
let permValue =
Services.perms.testExactPermissionFromPrincipal(principal, type);
if (permValue == Ci.nsIPermissionManager.ALLOW_ACTION) {
aAllowCallback();
if (aAllowCallback) {
aAllowCallback();
}
return;
} else if (permValue == Ci.nsIPermissionManager.DENY_ACTION ||
permValue == Ci.nsIPermissionManager.UNKNOWN_ACTION) {
if (aCancelCallback) {
aCancelCallback();
}
return;
} else if (permValue == Ci.nsIPermissionManager.DENY_ACTION) {
aCancelCallback();
}
// Create an array with a single nsIContentPermissionType element.
@ -425,7 +431,7 @@ ContactManager.prototype = {
}.bind(this);
let cancelCallback = function() {
Services.DOMRequest.fireError(request);
Services.DOMRequest.fireError(request, "");
};
this.askPermission("revision", request, allowCallback, cancelCallback);
@ -442,7 +448,7 @@ ContactManager.prototype = {
}.bind(this);
let cancelCallback = function() {
Services.DOMRequest.fireError(request);
Services.DOMRequest.fireError(request, "");
};
this.askPermission("count", request, allowCallback, cancelCallback);

Просмотреть файл

@ -5,11 +5,14 @@ skip-if = e10s
[test_contacts_basics.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_basics2.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_blobs.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_events.html]
[test_contacts_getall.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_getall2.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_contacts_international.html]
[test_contacts_substringmatching.html]
[test_contacts_substringmatchingVE.html]