-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathkanon-status-below-threshold.https.window.js
40 lines (35 loc) · 1.41 KB
/
kanon-status-below-threshold.https.window.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// META: script=/resources/testdriver.js
// META: script=/resources/testdriver-vendor.js
// META: script=/common/utils.js
// META: script=resources/fledge-util.sub.js
// META: script=/common/subset-tests.js
"use strict";
subsetTest(
promise_test,
async test => {
const uuid = generateUuid(test);
let reportWin = `
if (browserSignals.kAnonStatus !== "belowThreshold") {
sendReportTo('${createBidderReportURL(uuid, 'error')}');
return false;
}
sendReportTo('${createBidderReportURL(uuid)}');
`;
let interestGroupOverrides = {
biddingLogicURL: createBiddingScriptURL({reportWin: reportWin})
};
let interestGroup = createInterestGroupForOrigin(
uuid, window.location.origin, interestGroupOverrides);
await joinInterestGroupWithoutDefaults(test, interestGroup);
// Make the interest group not k-anonymous.
await test_driver.set_protected_audience_k_anonymity(
interestGroup.owner, interestGroup.name, []);
let auctionConfigOverrides = {
decisionLogicURL: createDecisionScriptURL(uuid, {})
};
await runBasicFledgeAuctionAndNavigate(
test, uuid, auctionConfigOverrides);
await waitForObservedRequests(uuid, [createBidderReportURL(uuid)]);
},
'Check kAnonStatus is "belowThreshold" when FledgeConsiderKAnonymity' +
'is enabled and FledgeEnforceKAnonymity is disabled');