1
0
Fork 0
firefox/toolkit/components/cookiebanners/test/browser/browser_bannerClicking_slowLoad.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
797 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_setup(clickTestSetup);
/**
* Test the banner clicking with the case where the banner is added shortly after
* page load, but the page load itself is delayed.
*/
add_task(async function test_clicking_with_delayed_banner() {
await SpecialPowers.pushPrefEnv({
set: [
["cookiebanners.service.mode", Ci.nsICookieBannerService.MODE_REJECT],
],
});
insertTestClickRules();
// A test page that has a delayed load event.
let TEST_PAGE = TEST_ORIGIN_A + TEST_PATH + "file_delayed_banner_load.html";
await openPageAndVerify({
win: window,
domain: TEST_DOMAIN_A,
testURL: TEST_PAGE,
visible: false,
expected: "OptOut",
});
});