Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLEDGE: Include BSRID w/creative scanning metadata in TSS request. #50420

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fledge/tentative/resources/fledge_http_server_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def decode_trusted_scoring_signals_params(request):
pair[0] == 'adSizes' or
pair[0] == 'adComponentSizes' or
pair[0] == 'adBuyer' or
pair[0] == 'adComponentBuyer'):
pair[0] == 'adComponentBuyer' or
pair[0] == 'adBuyerAndSellerReportingIds'):
continue
raise ValueError("Unexpected query parameter: " + param)

Expand Down
22 changes: 18 additions & 4 deletions fledge/tentative/trusted-scoring-signals.https.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,16 +809,22 @@ subsetTest(promise_test, async test => {

const bidder_origin = OTHER_ORIGIN1;

await joinCrossOriginInterestGroup(
test, uuid, bidder_origin,
{ads: [{renderURL: renderURL, creativeScanningMetadata: 'hello'}]});
await joinCrossOriginInterestGroup(test, uuid, bidder_origin, {
ads: [{
renderURL: renderURL,
creativeScanningMetadata: 'hello',
buyerAndSellerReportingId: 'chair'
}]
});

const scoreAdBody = `
${makeParseHelper(renderURL)}
if (parsed.get('renderUrls') !== '${renderURL}')
throw 'Wrong URL';
if (parsed.get('adCreativeScanningMetadata') !== 'hello')
throw 'Wrong creative scanning metadata';
if (parsed.get('adBuyerAndSellerReportingIds') !== 'chair')
throw 'Wrong BSRID';
if (parsed.get('adSizes') !== ',')
throw 'Wrong adSizes';
if (parsed.get('adBuyer') !== '${bidder_origin}')
Expand Down Expand Up @@ -852,14 +858,16 @@ subsetTest(promise_test, async test => {

await joinCrossOriginInterestGroup(
test, uuid, bidder_origin,
{ads: [{renderURL: renderURL}]});
{ads: [{renderURL: renderURL, buyerAndSellerReportingId: 'sofa'}]});

const scoreAdBody = `
${makeParseHelper(renderURL)}
if (parsed.get('renderUrls') !== '${renderURL}')
throw 'Wrong URL';
if (parsed.get('adCreativeScanningMetadata') !== '')
throw 'Wrong creative scanning metadata';
if (parsed.get('adBuyerAndSellerReportingIds') !== 'sofa')
throw 'Wrong BSRID';
if (parsed.get('adSizes') !== ',')
throw 'Wrong adSizes';
if (parsed.get('adBuyer') !== '${bidder_origin}')
Expand Down Expand Up @@ -899,6 +907,8 @@ subsetTest(promise_test, async test => {
throw 'Wrong URL';
if (parsed.has('adCreativeScanningMetadata'))
throw 'Unexpected creative scanning metadata';
if (parsed.has('adBuyerAndSellerReportingIds'))
throw 'Unexpected BSRID';
if (parsed.has('adSizes'))
throw 'Unexpected adSizes';
if (parsed.has('adBuyer'))
Expand Down Expand Up @@ -958,6 +968,8 @@ subsetTest(promise_test, async test => {
throw 'Wrong URL';
if (parsed.get('adCreativeScanningMetadata') !== 'hello')
throw 'Wrong creative scanning metadata';
if (parsed.get('adBuyerAndSellerReportingIds') !== '')
throw 'Wrong BSRID';
if (parsed.get('adSizes') !== '100px,10sh')
throw 'Wrong adSizes';
if (parsed.get('adBuyer') !== '${window.location.origin}')
Expand Down Expand Up @@ -1035,6 +1047,8 @@ subsetTest(promise_test, async test => {
throw 'Wrong URL';
if (parsed.get('adCreativeScanningMetadata') !== 'hello')
throw 'Wrong creative scanning metadata';
if (parsed.get('adBuyerAndSellerReportingIds') !== '')
throw 'Wrong BSRID';
if (parsed.get('adSizes') !== ',')
throw 'Wrong adSizes';
if (parsed.get('adBuyer') !== '${window.location.origin}')
Expand Down