Bug 1192925: Test that system add-ons are marked as un-uninstallable and un-upgradable. r=rhelmer
authorDave Townsend <dtownsend@oxymoronical.com>
Fri, 11 Sep 2015 10:51:06 -0700
changeset 262568 6c8434091522526df255f1944151e263d8c93e80
parent 262567 5afeefb4e7f1ff82551a08bdefb9d77b3f378840
child 262569 7fef7994f691875be099b47057bf8fb89e5e858c
push id15191
push userdtownsend@mozilla.com
push dateTue, 15 Sep 2015 17:46:44 +0000
treeherderfx-team@6c8434091522 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1192925
milestone43.0a1
Bug 1192925: Test that system add-ons are marked as un-uninstallable and un-upgradable. r=rhelmer
toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
@@ -34,16 +34,18 @@ function* check_installed(inProfile, ...
     let addon = yield promiseAddonByID(id);
 
     if (versions[i]) {
       // Add-on should be installed
       do_check_neq(addon, null);
       do_check_eq(addon.version, versions[i]);
       do_check_true(addon.isActive);
       do_check_false(addon.foreignInstall);
+      do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_UPGRADE));
+      do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_UNINSTALL));
 
       // Verify the add-ons file is in the right place
       let file = expectedDir.clone();
       file.append(id + ".xpi");
       do_check_true(file.exists());
       do_check_true(file.isFile());
 
       let uri = addon.getResourceURI(null);