зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1849657 - Changed consumed check for transient user activation to use lastUserGestureTimeStamp. r=bvandersloot,anti-tracking-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D187121
This commit is contained in:
Родитель
abf52e18ac
Коммит
eae6af8066
|
@ -40,6 +40,8 @@ async function requestStorageAccessAndExpectUserActivationActive() {
|
|||
// Callback function to check if the user activation was consumed
|
||||
async function requestStorageAccessAndExpectUserActivationConsumed() {
|
||||
SpecialPowers.wrap(document).notifyUserGestureActivation();
|
||||
const lastUserGesture = SpecialPowers.wrap(document).lastUserGestureTimeStamp;
|
||||
|
||||
let p = document.requestStorageAccess();
|
||||
try {
|
||||
await p;
|
||||
|
@ -54,8 +56,8 @@ async function requestStorageAccessAndExpectUserActivationConsumed() {
|
|||
`check has-been-user-activated on the top-level-document`
|
||||
);
|
||||
is(
|
||||
SpecialPowers.wrap(document).hasValidTransientUserGestureActivation,
|
||||
false,
|
||||
SpecialPowers.wrap(document).lastUserGestureTimeStamp,
|
||||
lastUserGesture,
|
||||
`check has-valid-transient-user-activation on the top-level-document`
|
||||
);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче