Bug 764003 - Remove enablePrivilege calls from settings and contacts API tests. r=bent

This commit is contained in:
Gregor Wagner 2012-06-12 11:13:11 -07:00
Родитель ff9787a741
Коммит dafa1cd8f3
2 изменённых файлов: 5 добавлений и 25 удалений

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

@ -19,14 +19,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id={674720}
<pre id="test"> <pre id="test">
<script class="testbody" type="text/javascript"> <script class="testbody" type="text/javascript">
"use strict" "use strict";
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); SpecialPowers.addPermission("webcontacts-manage", true, document);
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager)
.add(SpecialPowers.getDocumentURIObject(window.document),
"webcontacts-manage",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
// For Sorting // For Sorting
var c1 = { var c1 = {
@ -526,12 +521,6 @@ var steps = [
req.onsuccess = onUnwantedSuccess; req.onsuccess = onUnwantedSuccess;
req.onerror = function() { ok(true, "Successfully declined updating old contact!"); next(); }; req.onerror = function() { ok(true, "Successfully declined updating old contact!"); next(); };
}, },
function() {
ok(true, "Saving old contact, should abort!");
req = mozContacts.save(findResult1)
req.onsuccess = onUnwantedSuccess;
req.onerror = function() { ok(true, "Successfully declined updating old contact!"); next(); };
},
function () { function () {
ok(true, "Retrieving a specific contact by ID"); ok(true, "Retrieving a specific contact by ID");
var options = {filterBy: ["id"], var options = {filterBy: ["id"],

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

@ -19,19 +19,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id={678695}
<pre id="test"> <pre id="test">
<script class="testbody" type="text/javascript"> <script class="testbody" type="text/javascript">
"use strict" "use strict";
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); SpecialPowers.addPermission("websettings-read", true, document);
Components.classes["@mozilla.org/permissionmanager;1"] SpecialPowers.addPermission("websettings-readwrite", true, document);
.getService(Components.interfaces.nsIPermissionManager)
.add(SpecialPowers.getDocumentURIObject(window.document),
"websettings-read",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager)
.add(SpecialPowers.getDocumentURIObject(window.document),
"websettings-readwrite",
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
function onUnwantedSuccess() { function onUnwantedSuccess() {
ok(false, "onUnwantedSuccess: shouldn't get here"); ok(false, "onUnwantedSuccess: shouldn't get here");