mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1498466 - Ensure that hasStorageAccess() returns a sensible value with cookieBehavior set to accept all cookies r=baku
Differential Revision: https://phabricator.services.mozilla.com/D8584 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e38073ca8f
commit
bd4eab0ff0
@ -13806,6 +13806,7 @@ nsIDocument::RequestStorageAccess(mozilla::ErrorResult& aRv)
|
||||
promise->MaybeRejectWithUndefined();
|
||||
});
|
||||
} else {
|
||||
outer->SetHasStorageAccess(true);
|
||||
promise->MaybeResolveWithUndefined();
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ async function callRequestStorageAccess(callback) {
|
||||
}
|
||||
ok(success, "Should not have thrown");
|
||||
|
||||
await noStorageAccessInitially();
|
||||
await hasStorageAccessInitially();
|
||||
|
||||
await interactWithTracker();
|
||||
|
||||
@ -89,11 +89,11 @@ async function callRequestStorageAccess(callback) {
|
||||
rejected = true;
|
||||
}
|
||||
|
||||
success = rejectTrackers && !threw && !rejected;
|
||||
success = !threw && !rejected;
|
||||
let hasAccess = await document.hasStorageAccess();
|
||||
is(hasAccess, success,
|
||||
"Should " + (success ? "" : "not ") + "have storage access now");
|
||||
if (success) {
|
||||
if (success && rejectTrackers) {
|
||||
// Wait until the permission is visible in our process to avoid race
|
||||
// conditions.
|
||||
await waitUntilPermission("http://example.net/browser/toolkit/components/antitracking/test/browser/page.html",
|
||||
|
Loading…
Reference in New Issue
Block a user