Bug 1297693 - Used a more specific selector in tests for blocked permission icons in browser_permissions.js. r=johannh, r=dao
authorUdayan Baidya <udayanbaidya@gmail.com>
Mon, 05 Sep 2016 09:23:00 -0400
changeset 313143 d3d05b94bc1bd2cb443109cd8b5700cefaf41f09
parent 313142 b9d4367322d408fbc42c01268b477cd92fee76c1
child 313144 a1e635fc39e261b45e5799809a051b6b51a10f59
push id32127
push usercbook@mozilla.com
push dateThu, 08 Sep 2016 10:52:18 +0000
treeherderautoland@d00937cdf44d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, dao
bugs1297693
milestone51.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 1297693 - Used a more specific selector in tests for blocked permission icons in browser_permissions.js. r=johannh, r=dao
browser/base/content/test/general/browser_permissions.js
--- a/browser/base/content/test/general/browser_permissions.js
+++ b/browser/base/content/test/general/browser_permissions.js
@@ -179,24 +179,27 @@ add_task(function* testPermissionIcons()
   let {gIdentityHandler} = gBrowser.ownerGlobal;
   let tab = gBrowser.selectedTab = gBrowser.addTab();
   yield promiseTabLoadEvent(tab, PERMISSIONS_PAGE);
 
   SitePermissions.set(gBrowser.currentURI, "camera", SitePermissions.ALLOW);
   SitePermissions.set(gBrowser.currentURI, "geo", SitePermissions.BLOCK);
   SitePermissions.set(gBrowser.currentURI, "microphone", SitePermissions.SESSION);
 
-  let geoIcon = gIdentityHandler._identityBox.querySelector("[data-permission-id='geo']");
+  let geoIcon = gIdentityHandler._identityBox
+    .querySelector(".blocked-permission-icon[data-permission-id='geo']");
   ok(geoIcon.hasAttribute("showing"), "blocked permission icon is shown");
 
-  let cameraIcon = gIdentityHandler._identityBox.querySelector("[data-permission-id='camera']");
+  let cameraIcon = gIdentityHandler._identityBox
+    .querySelector(".blocked-permission-icon[data-permission-id='camera']");
   ok(!cameraIcon.hasAttribute("showing"),
     "allowed permission icon is not shown");
 
-  let microphoneIcon  = gIdentityHandler._identityBox.querySelector("[data-permission-id='microphone']");
+  let microphoneIcon  = gIdentityHandler._identityBox
+    .querySelector(".blocked-permission-icon[data-permission-id='microphone']");
   ok(!microphoneIcon.hasAttribute("showing"),
     "allowed permission icon is not shown");
 
   SitePermissions.remove(gBrowser.currentURI, "geo");
 
   ok(!geoIcon.hasAttribute("showing"),
     "blocked permission icon is not shown after reset");
 });