fixed testPermission() issue by wrapping uri as nsIURI