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:
@@ -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}`
|
||||
);
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user