1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
6 let bounceTrackingProtection;
8 add_setup(async function () {
9 await SpecialPowers.pushPrefEnv({
11 ["privacy.bounceTrackingProtection.requireStatefulBounces", true],
12 ["privacy.bounceTrackingProtection.bounceTrackingGracePeriodSec", 0],
15 bounceTrackingProtection = Cc[
16 "@mozilla.org/bounce-tracking-protection;1"
17 ].getService(Ci.nsIBounceTrackingProtection);
22 add_task(async function test_bounce_stateful_cookies_client() {
23 info("Test client bounce with cookie.");
26 setState: "cookie-client",
28 info("Test client bounce without cookie.");
32 expectCandidate: false,
37 add_task(async function test_bounce_stateful_cookies_server() {
38 info("Test server bounce with cookie.");
41 setState: "cookie-server",
43 info("Test server bounce without cookie.");
47 expectCandidate: false,
54 // TODO: Bug 1848406: Implement stateful bounce detection for localStorage.
55 add_task(async function test_bounce_stateful_localStorage() {
56 info("TODO: client bounce with localStorage.");
59 setState: "localStorage",
60 expectCandidate: false,