Bug 1915430 - Removed obsolete context check in shouldAllowFxaStatus function r=markh,skhamis

Differential Revision: https://phabricator.services.mozilla.com/D245962
This commit is contained in:
lougeniac64
2025-04-28 16:50:35 +00:00
parent e75aaf20ee
commit bf59b8272e
2 changed files with 1 additions and 28 deletions

View File

@@ -796,11 +796,8 @@ FxAccountsWebChannelHelpers.prototype = {
// with FxA as part of a Sync flow should work all the time. If
// Sync is broken in PB mode, users will think Firefox is broken.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1323853
//
// XXX - This hard-coded context seems bad?
let pb = this.isPrivateBrowsingMode(sendingContext);
let ok =
!pb || service === "sync" || context === "fx_desktop_v3" || isPairing;
let ok = !pb || service === "sync" || isPairing;
log.debug(
`fxa status ok=${ok} - private=${pb}, service=${service}, context=${context}, pairing=${isPairing}`
);

View File

@@ -1404,30 +1404,6 @@ add_task(
}
);
add_task(
async function test_helpers_shouldAllowFxaStatus_desktop_context_private_browsing() {
let wasCalled = {
isPrivateBrowsingMode: false,
};
let helpers = new FxAccountsWebChannelHelpers({});
helpers.isPrivateBrowsingMode = sendingContext => {
wasCalled.isPrivateBrowsingMode = true;
Assert.equal(sendingContext, mockSendingContext);
return true;
};
let shouldAllowFxaStatus = helpers.shouldAllowFxaStatus(
"",
mockSendingContext,
false,
"fx_desktop_v3"
);
Assert.ok(shouldAllowFxaStatus);
Assert.ok(wasCalled.isPrivateBrowsingMode);
}
);
add_task(
async function test_helpers_shouldAllowFxaStatus_oauth_service_private_browsing() {
let wasCalled = {