Skip to content

Commit

Permalink
Bug 1878741 - Part 1: Stop requirng notification.prompt.testing for s…
Browse files Browse the repository at this point in the history
…et-permission r=webdriver-reviewers,Sasha

Differential Revision: https://phabricator.services.mozilla.com/D210741
  • Loading branch information
saschanaz committed May 17, 2024
1 parent 07dad1e commit d267322
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions remote/marionette/driver.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3359,17 +3359,6 @@ GeckoDriver.prototype.setPermission = async function (cmd) {

lazy.permissions.validatePermission(descriptor.name);

// Bug 1878741: Allowing this permission causes timing related Android crash.
if (descriptor.name === "notifications") {
if (Services.prefs.getBoolPref("notification.prompt.testing", false)) {
// Okay, do nothing. The notifications module will work without permission.
return;
}
throw new lazy.error.UnsupportedOperationError(
`Setting "descriptor.name" "notifications" expected "notification.prompt.testing" preference to be set`
);
}

let params;
try {
params =
Expand Down
11 changes: 0 additions & 11 deletions remote/webdriver-bidi/modules/root/permissions.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ class PermissionsModule extends Module {

lazy.permissions.validatePermission(permissionName);

// Bug 1878741: Allowing this permission causes timing related Android crash.
if (descriptor.name === "notifications") {
if (Services.prefs.getBoolPref("notification.prompt.testing", false)) {
// Okay, do nothing. The notifications module will work without permission.
return;
}
throw new lazy.error.UnsupportedOperationError(
`Setting "descriptor.name" "notifications" expected "notification.prompt.testing" preference to be set`
);
}

if (permissionName === "storage-access") {
// TODO: Bug 1895457. Add support for "storage-access" permission.
throw new lazy.error.UnsupportedOperationError(
Expand Down

0 comments on commit d267322

Please sign in to comment.