Bug 1116765 - Fix browser_noperm.js test to consider indexedDB an always allowed permission. r=myk
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Wed, 31 Dec 2014 07:05:00 +0100
changeset 250852 7d8cf5a0e17f36ba8c252deb2317f0827ef0b79a
parent 250851 96b5f182f5aa40bf962c1c4c38b94ca086857232
child 250853 c8bca1420a469dcab29b88c08d320787e248aeb5
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmyk
bugs1116765
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1116765 - Fix browser_noperm.js test to consider indexedDB an always allowed permission. r=myk
webapprt/test/chrome/browser_noperm.js
--- a/webapprt/test/chrome/browser_noperm.js
+++ b/webapprt/test/chrome/browser_noperm.js
@@ -13,19 +13,25 @@ function test() {
 
     // Check that the app is non privileged.
     is(AppsUtils.getAppManifestStatus(app.manifest), Ci.nsIPrincipal.APP_STATUS_INSTALLED, "The app is not privileged");
 
     // Check that the app principal has the correct appId.
     let principal = document.getElementById("content").contentDocument.defaultView.document.nodePrincipal;
     is(DOMApplicationRegistry.getAppLocalIdByManifestURL(app.manifestURL), principal.appId, "Principal app ID correct");
 
+    let alwaysAllowed = ["indexedDB"]
+
     // Check if all the permissions of the app are unknown.
     for (let permName of AllPossiblePermissions) {
       // Get the value for the permission.
       let permValue = Services.perms.testExactPermissionFromPrincipal(principal, permName);
 
-      is(permValue, Ci.nsIPermissionManager.UNKNOWN_ACTION, "Permission " + permName + " unknown.");
+      if (alwaysAllowed.includes(permName)) {
+        is(permValue, Ci.nsIPermissionManager.ALLOW_ACTION, "Permission " + permName + " allowed.");
+      } else {
+        is(permValue, Ci.nsIPermissionManager.UNKNOWN_ACTION, "Permission " + permName + " unknown.");
+      }
     }
 
     finish();
   });
 }