Skip to content

Commit

Permalink
FLEDGE: Include BSRID w/creative scanning metadata in TSS request.
Browse files Browse the repository at this point in the history
Adds buyerAndSellerReportingId (BSRID) to the query parameters of
the BYOS scoring signals request URL for use in creative scanning
when `sendCreativeScanningMetadata` is set to true on the
auction config.

See
WICG/turtledove#792 (comment)
for more context (along with following comments)

Bug: 383513677
Change-Id: I77dced8bb39a55cf7b7ad9fb80c91fed8c9dad00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6219861
Reviewed-by: Orr Bernstein <orrb@google.com>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414406}
  • Loading branch information
Maks Orlovich authored and chromium-wpt-export-bot committed Jan 31, 2025
1 parent b7445af commit 6e48267
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
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

0 comments on commit 6e48267

Please sign in to comment.